import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import setupNodeEvents from './src/plugins/index';

const cypressJsonConfig = {
  fileServerFolder: '.',
  fixturesFolder: './src/fixtures',
  video: false,
  videosFolder: '../../dist/cypress/apps/auth-demo-e2e/videos',
  screenshotsFolder: '../../dist/cypress/apps/auth-demo-e2e/screenshots',
  chromeWebSecurity: false,
  reporter: 'junit',
  specPattern: 'src/integration/**/*.spec.ts',
  supportFile: 'src/support/e2e.ts',
  testIsolation: false,
};
export default defineConfig({
  e2e: {
    ...nxE2EPreset(__dirname),
    ...cypressJsonConfig,
    setupNodeEvents,
  },
});
