mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
f3951e1680
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8079 Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com> GitOrigin-RevId: 46b1ed03ab225fccc9d769203d1af11a6bcdb63e
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
import { defineConfig } from 'cypress';
|
|
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
|
|
import { initPlugin as initSnapshotPlugin } from 'cypress-plugin-snapshots/plugin';
|
|
|
|
import * as customTasks from './src/support/tasks';
|
|
|
|
type ConfigOptions = Parameters<typeof defineConfig>[0];
|
|
|
|
const nxConfig = nxE2EPreset(__filename);
|
|
|
|
interface MyConfigOptions extends ConfigOptions {
|
|
useRelativeSnapshots?: boolean;
|
|
}
|
|
|
|
const myDefineConfig = (config: MyConfigOptions) => defineConfig(config);
|
|
export default myDefineConfig({
|
|
viewportWidth: 1440,
|
|
viewportHeight: 900,
|
|
|
|
chromeWebSecurity: false,
|
|
numTestsKeptInMemory: 10,
|
|
|
|
retries: {
|
|
openMode: 0,
|
|
// Allows for one automatic retry per test
|
|
// see: https://docs.cypress.io/guides/guides/test-retries#How-It-Works
|
|
runMode: 1,
|
|
},
|
|
|
|
projectId: '5yiuic',
|
|
|
|
e2e: {
|
|
...nxConfig,
|
|
|
|
video: false,
|
|
|
|
specPattern: [
|
|
'src/e2e/**/*test.{js,jsx,ts,tsx}',
|
|
'src/support/**/*unit.test.{js,ts}',
|
|
],
|
|
|
|
setupNodeEvents(on, config) {
|
|
on('task', {
|
|
...customTasks,
|
|
});
|
|
|
|
initSnapshotPlugin(on, config);
|
|
|
|
return config;
|
|
},
|
|
},
|
|
|
|
useRelativeSnapshots: true,
|
|
});
|