Skip to content

Commit ff06bce

Browse files
committed
add more screenshot logs
1 parent bd1e77b commit ff06bce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: test/screenshot/screenshot.test.js

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ for (const config of buttonConfigs) {
5858
const filename = config.filename || dotifyToString(config) || 'base';
5959

6060
test(`Render button with ${ filename }`, async () => {
61+
console.log(">>> screenshot.test.js for loop test block log")
6162
const { page } = await setupBrowserPage;
6263

6364
// fasten up the animation
@@ -66,6 +67,7 @@ for (const config of buttonConfigs) {
6667
const diffpath = `${ IMAGE_DIR }/${ filename }-old.png`;
6768

6869
const { x, y, width, height } = await page.evaluate(async (options, userAgents) => {
70+
console.log(">>> screenshot.test.js for loop page.evaluate log")
6971

7072
// $FlowFixMe
7173
document.body.innerHTML = '';
@@ -129,6 +131,7 @@ for (const config of buttonConfigs) {
129131
]);
130132

131133
if (existing) {
134+
console.log(">>> screenshot.test.js for loop if (existing) block log")
132135
const delta = await diffPNG(screenshot, existing);
133136

134137
if (delta > DIFF_THRESHOLD) {
@@ -146,9 +149,12 @@ for (const config of buttonConfigs) {
146149
}
147150

148151
} else {
152+
console.log(">>> screenshot.test.js for loop if (existing) else block log")
149153
await screenshot.write(filepath);
150154
}
155+
console.log(`>>> screenshot.test.js for loop pre-increment index log: ${index}`)
151156
index += 1;
157+
console.log(`>>> screenshot.test.js for loop post-increment index log: ${index}`)
152158
console.log(`Generating button screenshot: ${ index } / ${ total }`);
153159
});
154160
}

0 commit comments

Comments
 (0)