File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 4545 typeof NodeEnvironmentClass
4646 ) ;
4747 // Last resort fallback - use dynamic import to avoid linter warning
48- // eslint-disable-next-line global-require
48+ // eslint-disable-next-line no-new-func
4949 const fallbackEnv = Function ( 'return require("jest-environment-node")' ) ( ) ;
5050 NodeEnvironmentClass = fallbackEnv . default || fallbackEnv ;
5151 }
Original file line number Diff line number Diff line change 11export const openAddon = async ( page ) => {
22 await page . goto ( process . env . SHEET_URL ) ;
33
4- await page . waitForTimeout ( 5000 ) ; // pause for 5 seconds
4+ await page . waitForTimeout ( 7000 ) ; // pause for 5 seconds
5+
6+ // Create directory for screenshots if it doesn't exist
7+ const fs = await import ( 'fs' ) ;
8+ const path = await import ( 'path' ) ;
9+ const screenshotDir = 'test/__image_snapshots__/__diff_output__' ;
10+ if ( ! fs . existsSync ( screenshotDir ) ) {
11+ fs . mkdirSync ( screenshotDir , { recursive : true } ) ;
12+ }
13+
514 // take screenshot
615 await page . screenshot ( {
7- path : 'test/__image_snapshots__/__diff_output__/ main-spreadsheet-page.png',
16+ path : path . join ( screenshotDir , ' main-spreadsheet-page.png') ,
817 } ) ;
918 await page . click ( 'a:nth-child(2)' ) ; // click on signin button
1019
You can’t perform that action at this time.
0 commit comments