1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { defineConfig } from "cypress";
6 import baseWebpackConfig from "./config/webpack.config";
7 import path from "path";
8 import EventEmitter from "events";
10 // Increase the default max listeners to avoid warnings
11 // this doesn't matter when running the entire suite,
12 // but necessary when running a single test repeatedly
13 EventEmitter.defaultMaxListeners = 100;
15 const webpackConfig = baseWebpackConfig("development");
17 export default defineConfig({
18 chromeWebSecurity: false,
21 downloadsFolder: "cypress/downloads",
22 videoCompression: false,
24 // projectId is for use with Cypress Cloud/CI, which we are currently not using
25 // projectId: "pzrqer",
28 // We've imported your old cypress plugins here.
29 // You may want to clean this up later by importing these.
30 setupNodeEvents(on, config) {
31 require("cypress-fail-fast/plugin")(on, config);
32 require('./cypress/plugins/index.js')(on, config)
35 baseUrl: 'https://localhost:3000/',
36 experimentalRunAllSpecs: true,
37 // The 2 options below make Electron crash a lot less and Firefox behave better
38 experimentalMemoryManagement: true,
39 numTestsKeptInMemory: 2,
49 ...webpackConfig.resolve,
51 ...webpackConfig.resolve.alias,
52 // redirect imported modules to the mock files for the cypress tests
53 "common/service-provider": path.resolve("src/cypress/mocks/service-provider.ts"),