Skip to content

Commit

Permalink
Fix applitools
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Jan 23, 2024
1 parent 17066aa commit 493f238
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 51 deletions.
19 changes: 0 additions & 19 deletions applitools.config.js

This file was deleted.

32 changes: 0 additions & 32 deletions cypress.config.cjs

This file was deleted.

30 changes: 30 additions & 0 deletions cypress.config.ts
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,
})
);

0 comments on commit 493f238

Please sign in to comment.