2022-09-09 18:26:57 +05:30
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
|
2022-06-19 14:13:22 +02:00
|
|
|
const { defineConfig } = require('cypress');
|
|
|
|
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin');
|
2023-06-16 20:25:40 +05:30
|
|
|
const coverage = require('@cypress/code-coverage/task');
|
2022-06-19 14:13:22 +02:00
|
|
|
|
|
|
|
module.exports = defineConfig({
|
2022-09-21 10:36:38 +05:30
|
|
|
projectId: 'n2sma2',
|
2024-01-19 12:06:53 +05:30
|
|
|
viewportWidth: 1440,
|
|
|
|
viewportHeight: 1024,
|
2022-06-19 14:13:22 +02:00
|
|
|
e2e: {
|
2024-01-19 12:06:53 +05:30
|
|
|
specPattern: 'cypress/integration/**/*.{js,ts}',
|
2022-06-19 14:13:22 +02:00
|
|
|
setupNodeEvents(on, config) {
|
2023-06-16 20:25:40 +05:30
|
|
|
coverage(on, config);
|
2024-01-19 12:06:53 +05:30
|
|
|
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;
|
|
|
|
});
|
2022-06-19 14:13:22 +02:00
|
|
|
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,
|
|
|
|
});
|
2022-09-14 01:43:07 +01:00
|
|
|
|
|
|
|
require('@applitools/eyes-cypress')(module);
|