-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5228 from mermaid-js/updateCypress
UpdateCypress
- Loading branch information
Showing
7 changed files
with
204 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from 'cypress'; | ||
import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin'; | ||
import coverage from '@cypress/code-coverage/task'; | ||
import eyesPlugin from '@applitools/eyes-cypress'; | ||
export default eyesPlugin( | ||
defineConfig({ | ||
projectId: 'n2sma2', | ||
viewportWidth: 1440, | ||
viewportHeight: 1024, | ||
e2e: { | ||
specPattern: 'cypress/integration/**/*.{js,ts}', | ||
setupNodeEvents(on, config) { | ||
coverage(on, config); | ||
on('before:browser:launch', (browser, launchOptions) => { | ||
if (browser.name === 'chrome' && browser.isHeadless) { | ||
launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); | ||
} | ||
return launchOptions; | ||
}); | ||
addMatchImageSnapshotPlugin(on, config); | ||
// copy any needed variables from process.env to config.env | ||
config.env.useAppli = process.env.USE_APPLI ? true : false; | ||
|
||
// do not forget to return the changed config object! | ||
return config; | ||
}, | ||
}, | ||
video: false, | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.