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 return require("./cypress/plugins/index.js")(on, config);
33 baseUrl: "https://localhost:3000/",
34 experimentalRunAllSpecs: true,
35 // The 2 options below make Electron crash a lot less and Firefox behave better
36 experimentalMemoryManagement: true,
37 numTestsKeptInMemory: 0,
47 ...webpackConfig.resolve,
49 ...webpackConfig.resolve.alias,
50 // redirect imported modules to the mock files for the cypress tests
51 "common/service-provider": path.resolve("src/cypress/mocks/service-provider.ts"),