21720: set contextmenu item text color in global theme
[arvados.git] / services / workbench2 / cypress.config.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { defineConfig } from "cypress";
6 import baseWebpackConfig from "./config/webpack.config";
7 import path from "path";
8 import EventEmitter from "events";
9
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;
14
15 const webpackConfig = baseWebpackConfig("development");
16
17 export default defineConfig({
18   chromeWebSecurity: false,
19   viewportWidth: 1920,
20   viewportHeight: 1080,
21   downloadsFolder: "cypress/downloads",
22   videoCompression: false,
23
24   // projectId is for use with Cypress Cloud/CI, which we are currently not using
25   // projectId: "pzrqer",
26
27   e2e: {
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);
32     },
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,
38   },
39
40   component: {
41     devServer: {
42       framework: "react",
43       bundler: "webpack",
44       webpackConfig: {
45         ...webpackConfig,
46         resolve: {
47           ...webpackConfig.resolve,
48           alias: {
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"),
52           },
53         },
54       },
55     },
56   },
57 });