-
Notifications
You must be signed in to change notification settings - Fork 3
/
cypress.config.js
41 lines (38 loc) · 1.14 KB
/
cypress.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { defineConfig } from "cypress";
import { setupHardhatEvents } from "./hardhat/index";
export default defineConfig({
devServer: {
framework: "nuxt",
bundler: "vite",
},
e2e: {
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:3000",
specPattern: "cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}",
async setupNodeEvents(on, config) {
await setupHardhatEvents(on, config);
// fix vkCreateInstance: Found no drivers! Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
// see: https://github.com/cypress-io/cypress/issues/29085#issuecomment-2013282654
on("before:browser:launch", (browser, launchOptions) => {
if (browser.family === "chromium") {
launchOptions.args.push("--disable-gpu");
}
return launchOptions;
});
return config;
},
},
defaultCommandTimeout: 20000,
video: false,
viewportWidth: 1280,
viewportHeight: 1024,
retries: {
experimentalStrategy: "detect-flake-and-pass-on-threshold",
experimentalOptions: {
maxRetries: 2,
passesRequired: 1,
},
runMode: true,
openMode: true,
},
});