forked from TeselaGen/tg-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
49 lines (46 loc) · 1.36 KB
/
cypress.config.ts
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
42
43
44
45
46
47
48
49
import { defineConfig } from "cypress";
import { getPort } from "./getPort";
// import vitePreprocessor from "cypress-vite";
// import path from "path";
export default ({
name = "pass_the_package_name_here",
projectId = "pass_a_cypress_project_id_here"
}) =>
defineConfig({
projectId,
viewportHeight: 800,
viewportWidth: 1280,
video: false,
pageLoadTimeout: 40000,
e2e: {
retries: {
runMode: 3,
openMode: 0
},
// setupNodeEvents(on, config) {
// on(
// "file:preprocessor",
// vitePreprocessor({
// // configFile: "./vite.config.js",
// configFile: path.resolve(__dirname, "./vite.config.js"),
// mode: "development"
// })
// );
// // return require("./cypress/plugins/index.js")(on, config);
// },
supportFile: "cypress/support/index.js",
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
// setupNodeEvents(on, config) {
// return require('./cypress/plugins/index.js')(on, config)
// },
baseUrl: `http://localhost:${getPort(name)}`,
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}"
}
// "component": {
// "devServer": {
// "framework": "react",
// "bundler": "webpack"
// }
// }
});