@@ -58,6 +58,7 @@ for (const config of buttonConfigs) {
58
58
const filename = config . filename || dotifyToString ( config ) || 'base' ;
59
59
60
60
test ( `Render button with ${ filename } ` , async ( ) => {
61
+ console . log ( ">>> screenshot.test.js for loop test block log" )
61
62
const { page } = await setupBrowserPage ;
62
63
63
64
// fasten up the animation
@@ -66,6 +67,7 @@ for (const config of buttonConfigs) {
66
67
const diffpath = `${ IMAGE_DIR } /${ filename } -old.png` ;
67
68
68
69
const { x, y, width, height } = await page . evaluate ( async ( options , userAgents ) => {
70
+ console . log ( ">>> screenshot.test.js for loop page.evaluate log" )
69
71
70
72
// $FlowFixMe
71
73
document . body . innerHTML = '' ;
@@ -129,6 +131,7 @@ for (const config of buttonConfigs) {
129
131
] ) ;
130
132
131
133
if ( existing ) {
134
+ console . log ( ">>> screenshot.test.js for loop if (existing) block log" )
132
135
const delta = await diffPNG ( screenshot , existing ) ;
133
136
134
137
if ( delta > DIFF_THRESHOLD ) {
@@ -146,9 +149,12 @@ for (const config of buttonConfigs) {
146
149
}
147
150
148
151
} else {
152
+ console . log ( ">>> screenshot.test.js for loop if (existing) else block log" )
149
153
await screenshot . write ( filepath ) ;
150
154
}
155
+ console . log ( `>>> screenshot.test.js for loop pre-increment index log: ${ index } ` )
151
156
index += 1 ;
157
+ console . log ( `>>> screenshot.test.js for loop post-increment index log: ${ index } ` )
152
158
console . log ( `Generating button screenshot: ${ index } / ${ total } ` ) ;
153
159
} ) ;
154
160
}
0 commit comments