-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.ts
More file actions
65 lines (51 loc) · 1.72 KB
/
cypress.config.ts
File metadata and controls
65 lines (51 loc) · 1.72 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @fileoverview Cypress configuration for the Cognitive Mesh E2E test suite.
*
* Configures both end-to-end and component testing, including retry
* strategies, viewport defaults, and custom support file paths.
*/
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
/** Base URL of the ASP.NET Core + React dev server. */
baseUrl: 'http://localhost:5000',
/** Path to the E2E support file that runs before every spec. */
supportFile: 'cypress/support/e2e.ts',
/** Glob pattern for locating E2E spec files. */
specPattern: 'cypress/e2e/**/*.cy.ts',
/** Default viewport width in pixels. */
viewportWidth: 1280,
/** Default viewport height in pixels. */
viewportHeight: 720,
/** Disable video recording to speed up CI runs. */
video: false,
/** Capture a screenshot when a test fails during `cypress run`. */
screenshotOnRunFailure: true,
/** Retry configuration: retries in headless (run) mode, none in open mode. */
retries: {
runMode: 2,
openMode: 0,
},
/** Default command timeout in milliseconds. */
defaultCommandTimeout: 10000,
/** Timeout for page-load transitions. */
pageLoadTimeout: 30000,
/** Timeout for `cy.request()` network calls. */
responseTimeout: 15000,
/**
* Hook that runs once before all specs.
* Can be extended with database seeding, auth token generation, etc.
*/
setupNodeEvents(on, config) {
// Register any plugins here (e.g. code coverage, visual regression).
return config;
},
},
component: {
/** Dev server configuration for component testing. */
devServer: {
framework: 'react',
bundler: 'webpack',
},
},
});