forked from project-chip/zap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.js
More file actions
54 lines (50 loc) · 1.55 KB
/
cypress.config.js
File metadata and controls
54 lines (50 loc) · 1.55 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
import { defineConfig } from 'cypress'
import { Mode } from './cypress/support/mode.js'
export default defineConfig({
viewportWidth: 1080,
viewportHeight: 920,
video: false,
e2e: {
baseUrl: 'http://localhost:9070',
setupNodeEvents(on, config) {
// Only load coverage plugin when CYPRESS_COVERAGE is set
if (process.env.CYPRESS_COVERAGE) {
require('@cypress/code-coverage/task')(on, config)
}
const mode = config.env.mode || Mode.zigbee
// Use glob patterns for each mode - Cypress handles file discovery
if (mode === Mode.zigbee) {
config.specPattern = 'cypress/e2e/**/*.cy.js'
config.excludeSpecPattern = [
...(config.excludeSpecPattern || []),
'**/matter/**',
'**/multiprotocol/**'
]
} else if (mode === Mode.matter) {
config.specPattern = 'cypress/e2e/**/*.cy.js'
config.excludeSpecPattern = [
...(config.excludeSpecPattern || []),
'**/zigbee/**',
'**/multiprotocol/**'
]
} else if (mode === Mode.multiprotocol) {
config.specPattern = 'cypress/e2e/**/*.cy.js'
config.excludeSpecPattern = [
...(config.excludeSpecPattern || []),
'**/zigbee/**',
'**/matter/**'
]
}
return config
},
testIsolation: false,
excludeSpecPattern: [
'**/file_open.spec.js',
'**/*.test.js',
'**/*.xml',
'**/*.zap',
'**/custom_xml.spec.js',
'**/check-cluster-attributes-singleton-in-zigbee-mode.spec.js'
]
}
})