@@ -11,10 +11,12 @@ describe('cloud debug test filtering', () => {
11
11
cy . waitForSpecToFinish ( )
12
12
13
13
cy . withCtx ( ( ctx ) => {
14
- ctx . coreData . cloud . testsForRunResults = [ 't2' ]
14
+ ctx . coreData . cloud . testsForRunResults = {
15
+ 'cypress/e2e/test.cy.js' : [ 't2' ] ,
16
+ }
15
17
} )
16
18
17
- cy . visitApp ( `specs/runner?file=cypress/e2e/test.cy.js&runId=123 ` )
19
+ cy . visitApp ( `specs/runner?file=cypress/e2e/test.cy.js&mode=debug ` )
18
20
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 } )
19
21
20
22
cy . get ( '.runnable-title' ) . contains ( 't2' )
@@ -23,10 +25,12 @@ describe('cloud debug test filtering', () => {
23
25
cy . waitForSpecToFinish ( { passCount : 2 , failCount : 2 } )
24
26
25
27
cy . withCtx ( ( ctx ) => {
26
- ctx . coreData . cloud . testsForRunResults = [ 's1 t4' ]
28
+ ctx . coreData . cloud . testsForRunResults = {
29
+ 'cypress/e2e/test.cy.js' : [ 's1 t4' ] ,
30
+ }
27
31
} )
28
32
29
- cy . visitApp ( `specs/runner?file=cypress/e2e/test.cy.js&runId=123 ` )
33
+ cy . visitApp ( `specs/runner?file=cypress/e2e/test.cy.js&mode=debug ` )
30
34
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 } )
31
35
32
36
cy . get ( '.runnable-title' ) . contains ( 't4' )
@@ -40,10 +44,12 @@ describe('cloud debug test filtering', () => {
40
44
cy . waitForSpecToFinish ( )
41
45
42
46
cy . withCtx ( ( ctx ) => {
43
- ctx . coreData . cloud . testsForRunResults = [ 'test1' ]
47
+ ctx . coreData . cloud . testsForRunResults = {
48
+ 'cypress/e2e/lots-of-tests.cy.js' : [ 'test1' ] ,
49
+ }
44
50
} )
45
51
46
- cy . visitApp ( `specs/runner?file=cypress/e2e/lots-of-tests.cy.js&runId=123 ` )
52
+ cy . visitApp ( `specs/runner?file=cypress/e2e/lots-of-tests.cy.js&mode=debug ` )
47
53
cy . waitForSpecToFinish ( { passCount : 50 } )
48
54
49
55
cy . get ( '@reporterPanel' ) . then ( ( el ) => el . width ( 500 ) )
@@ -66,10 +72,12 @@ describe('cloud debug test filtering', () => {
66
72
67
73
// .only is respected
68
74
cy . withCtx ( ( ctx ) => {
69
- ctx . coreData . cloud . testsForRunResults = [ 't1' , 't3' ]
75
+ ctx . coreData . cloud . testsForRunResults = {
76
+ 'cypress/e2e/skip-and-only.cy.js' : [ 't1' , 't3' ] ,
77
+ }
70
78
} )
71
79
72
- cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&runId=123 ` )
80
+ cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&mode=debug ` )
73
81
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 } )
74
82
75
83
cy . get ( '.runnable-title' ) . contains ( 't1' )
@@ -78,10 +86,12 @@ describe('cloud debug test filtering', () => {
78
86
79
87
// .only is ignored as it is not in set of filtered tests
80
88
cy . withCtx ( ( ctx ) => {
81
- ctx . coreData . cloud . testsForRunResults = [ 't3' ]
89
+ ctx . coreData . cloud . testsForRunResults = {
90
+ 'cypress/e2e/skip-and-only.cy.js' : [ 't3' ] ,
91
+ }
82
92
} )
83
93
84
- cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&runId=123 ` )
94
+ cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&mode=debug ` )
85
95
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 } )
86
96
87
97
cy . get ( '.runnable-title' ) . contains ( 't3' )
@@ -90,10 +100,12 @@ describe('cloud debug test filtering', () => {
90
100
91
101
// .skip is respected
92
102
cy . withCtx ( ( ctx ) => {
93
- ctx . coreData . cloud . testsForRunResults = [ 't2' , 't3' ]
103
+ ctx . coreData . cloud . testsForRunResults = {
104
+ 'cypress/e2e/skip-and-only.cy.js' : [ 't2' , 't3' ] ,
105
+ }
94
106
} )
95
107
96
- cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&runId=123 ` )
108
+ cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&mode=debug ` )
97
109
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 , pendingCount : 1 } )
98
110
cy . get ( '.runnable-title' ) . first ( ) . contains ( 't2' )
99
111
cy . get ( '.runnable-title' ) . last ( ) . contains ( 't3' )
@@ -102,20 +114,24 @@ describe('cloud debug test filtering', () => {
102
114
103
115
// suite.only is respected
104
116
cy . withCtx ( ( ctx ) => {
105
- ctx . coreData . cloud . testsForRunResults = [ 't3' , 's1 t4' ]
117
+ ctx . coreData . cloud . testsForRunResults = {
118
+ 'cypress/e2e/skip-and-only.cy.js' : [ 't3' , 's1 t4' ] ,
119
+ }
106
120
} )
107
121
108
- cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&runId=123 ` )
122
+ cy . visitApp ( `specs/runner?file=cypress/e2e/skip-and-only.cy.js&mode=debug ` )
109
123
cy . waitForSpecToFinish ( { passCount : 0 , failCount : 1 } )
110
124
cy . get ( '.runnable-title' ) . contains ( 't4' )
111
125
} )
112
126
113
127
it ( 'works with browser filter' , ( ) => {
114
128
cy . withCtx ( ( ctx ) => {
115
- ctx . coreData . cloud . testsForRunResults = [ 't1' , 's1 t2' ]
129
+ ctx . coreData . cloud . testsForRunResults = {
130
+ 'cypress/e2e/lots-of-tests.cy.j' : [ 't1' , 's1 t2' ] ,
131
+ }
116
132
} )
117
133
118
- cy . visitApp ( `specs/runner?file=cypress/e2e/browsers.cy.js&runId=123 ` )
134
+ cy . visitApp ( `specs/runner?file=cypress/e2e/browsers.cy.js&mode=debug ` )
119
135
120
136
cy . get ( '.runnable-title' ) . eq ( 0 ) . contains ( 't1 (skipped due to browser)' )
121
137
cy . get ( '.runnable-title' ) . eq ( 1 ) . contains ( 's1 (skipped due to browser)' )
@@ -130,10 +146,12 @@ describe('cloud debug test filtering', () => {
130
146
cy . waitForSpecToFinish ( )
131
147
132
148
cy . withCtx ( ( ctx ) => {
133
- ctx . coreData . cloud . testsForRunResults = [ 't2' , 't3' ]
149
+ ctx . coreData . cloud . testsForRunResults = {
150
+ 'cypress/e2e/lots-of-tests.cy.j' : [ 't2' , 't3' ] ,
151
+ }
134
152
} )
135
153
136
- cy . visitApp ( `specs/runner?file=cypress/e2e/domain-change.cy.js&runId=123 ` )
154
+ cy . visitApp ( `specs/runner?file=cypress/e2e/domain-change.cy.js&mode=debug ` )
137
155
cy . waitForSpecToFinish ( { failCount : 2 } )
138
156
} )
139
157
} )
0 commit comments