@@ -12,6 +12,8 @@ Cypress.Commands.add('rightArrow', (n = 1) => {
12
12
cy . get ( 'body' ) . wait ( 500 ) . type ( '{rightarrow}' . repeat ( n ) ) . wait ( 500 )
13
13
} )
14
14
15
+ const BASE = 'http://localhost:3041'
16
+
15
17
context ( 'Basic' , ( ) => {
16
18
beforeEach ( ( ) => {
17
19
cy . visit ( '/' )
@@ -26,13 +28,13 @@ context('Basic', () => {
26
28
. type ( `${ no } ` , { force : true } )
27
29
. type ( '{enter}' , { force : true } )
28
30
. url ( )
29
- . should ( 'eq' , `http://localhost:3030 /${ no } ` )
31
+ . should ( 'eq' , `${ BASE } /${ no } ` )
30
32
. wait ( 500 )
31
33
}
32
34
33
35
it ( 'basic nav' , ( ) => {
34
36
cy . url ( )
35
- . should ( 'eq' , 'http://localhost:3030/1' )
37
+ . should ( 'eq' , ` ${ BASE } /1` )
36
38
37
39
cy . contains ( 'Global Footer' )
38
40
. should ( 'exist' )
@@ -41,7 +43,7 @@ context('Basic', () => {
41
43
42
44
cy . rightArrow ( )
43
45
. url ( )
44
- . should ( 'eq' , 'http://localhost:3030/2' )
46
+ . should ( 'eq' , ` ${ BASE } /2` )
45
47
46
48
cy . contains ( 'Global Footer' )
47
49
. should ( 'not.exist' )
@@ -63,32 +65,32 @@ context('Basic', () => {
63
65
64
66
cy . get ( 'body' )
65
67
. type ( '{DownArrow}' )
66
- . url ( ) . should ( 'eq' , 'http://localhost:3030/6' )
68
+ . url ( ) . should ( 'eq' , ` ${ BASE } /6` )
67
69
68
70
cy . rightArrow ( )
69
71
70
72
cy
71
73
. url ( )
72
- . should ( 'eq' , 'http://localhost:3030/ 6?clicks=1' )
74
+ . should ( 'eq' , ` ${ BASE } / 6?clicks=1` )
73
75
74
76
cy . get ( 'body' )
75
77
. type ( '{RightArrow}{RightArrow}{RightArrow}{RightArrow}{RightArrow}{RightArrow}' )
76
- . url ( ) . should ( 'eq' , 'http://localhost:3030/7' )
78
+ . url ( ) . should ( 'eq' , ` ${ BASE } /7` )
77
79
78
80
cy . get ( 'body' )
79
81
. type ( '{LeftArrow}' )
80
82
. url ( )
81
- . should ( 'eq' , 'http://localhost:3030/ 6?clicks=6' )
83
+ . should ( 'eq' , ` ${ BASE } / 6?clicks=6` )
82
84
83
85
cy . get ( 'body' )
84
86
. type ( '{DownArrow}' )
85
87
. url ( )
86
- . should ( 'eq' , 'http://localhost:3030/7' )
88
+ . should ( 'eq' , ` ${ BASE } /7` )
87
89
88
90
cy . get ( 'body' )
89
91
. type ( '{UpArrow}' )
90
92
. url ( )
91
- . should ( 'eq' , 'http://localhost:3030/6' )
93
+ . should ( 'eq' , ` ${ BASE } /6` )
92
94
} )
93
95
94
96
it ( 'named slots' , ( ) => {
@@ -103,13 +105,13 @@ context('Basic', () => {
103
105
104
106
cy
105
107
. url ( )
106
- . should ( 'eq' , 'http://localhost:3030/9' )
108
+ . should ( 'eq' , ` ${ BASE } /9` )
107
109
108
110
cy . rightArrow ( )
109
111
110
112
cy
111
113
. url ( )
112
- . should ( 'eq' , 'http://localhost:3030/ 9?clicks=1' )
114
+ . should ( 'eq' , ` ${ BASE } / 9?clicks=1` )
113
115
114
116
cy . get ( '#slideshow .slidev-page-9 .cy-content .slidev-vclick-target:not(.slidev-vclick-hidden)' )
115
117
. should ( 'have.text' , 'CD' )
@@ -127,19 +129,19 @@ context('Basic', () => {
127
129
128
130
cy
129
131
. url ( )
130
- . should ( 'eq' , 'http://localhost:3030/ 9?clicks=4' )
132
+ . should ( 'eq' , ` ${ BASE } / 9?clicks=4` )
131
133
132
134
cy . rightArrow ( )
133
135
134
136
cy
135
137
. url ( )
136
- . should ( 'eq' , 'http://localhost:3030/10' )
138
+ . should ( 'eq' , ` ${ BASE } /10` )
137
139
138
140
cy . rightArrow ( )
139
141
140
142
cy
141
143
. url ( )
142
- . should ( 'eq' , 'http://localhost:3030/ 10?clicks=1' )
144
+ . should ( 'eq' , ` ${ BASE } / 10?clicks=1` )
143
145
144
146
cy . get ( '#slideshow .slidev-page-10 .cy-content-hide .slidev-vclick-target:not(.slidev-vclick-hidden)' )
145
147
. should ( 'have.text' , 'BD' )
@@ -158,13 +160,13 @@ context('Basic', () => {
158
160
159
161
cy
160
162
. url ( )
161
- . should ( 'eq' , 'http://localhost:3030/ 10?clicks=4' )
163
+ . should ( 'eq' , ` ${ BASE } / 10?clicks=4` )
162
164
163
165
cy . rightArrow ( )
164
166
165
167
cy
166
168
. url ( )
167
- . should ( 'eq' , 'http://localhost:3030/11' )
169
+ . should ( 'eq' , ` ${ BASE } /11` )
168
170
} )
169
171
170
172
it ( 'overview nav' , ( ) => {
@@ -173,30 +175,30 @@ context('Basic', () => {
173
175
cy . get ( 'body' )
174
176
. type ( 'o{RightArrow}{RightArrow}{Enter}' )
175
177
. url ( )
176
- . should ( 'eq' , 'http://localhost:3030/4' )
178
+ . should ( 'eq' , ` ${ BASE } /4` )
177
179
178
180
cy . get ( 'body' )
179
181
. type ( 'o{LeftArrow}{LeftArrow}{LeftArrow}{Enter}' )
180
182
. url ( )
181
- . should ( 'eq' , 'http://localhost:3030/1' )
183
+ . should ( 'eq' , ` ${ BASE } /1` )
182
184
183
185
cy . get ( 'body' )
184
186
. type ( 'o{DownArrow}{DownArrow}{DownArrow}{Enter}' )
185
187
. url ( )
186
- . should ( 'not.eq' , 'http://localhost:3030/1' )
188
+ . should ( 'not.eq' , ` ${ BASE } /1` )
187
189
188
190
cy . get ( 'body' )
189
191
. type ( 'o{UpArrow}{UpArrow}{UpArrow}{Enter}' )
190
192
. url ( )
191
- . should ( 'eq' , 'http://localhost:3030/1' )
193
+ . should ( 'eq' , ` ${ BASE } /1` )
192
194
} )
193
195
194
196
it ( 'deep nested lists' , ( ) => {
195
197
goPage ( 11 )
196
198
197
199
cy
198
200
. url ( )
199
- . should ( 'eq' , 'http://localhost:3030/11' )
201
+ . should ( 'eq' , ` ${ BASE } /11` )
200
202
201
203
cy . get ( 'body' )
202
204
. type ( '{RightArrow}{RightArrow}{RightArrow}' )
@@ -228,16 +230,16 @@ context('Basic', () => {
228
230
229
231
cy
230
232
. url ( )
231
- . should ( 'eq' , 'http://localhost:3030/12' )
233
+ . should ( 'eq' , ` ${ BASE } /12` )
232
234
233
235
cy . get ( 'body' )
234
236
. type ( '{RightArrow}{RightArrow}{RightArrow}{RightArrow}{RightArrow}{RightArrow}' )
235
237
. url ( )
236
- . should ( 'eq' , 'http://localhost:3030/ 12?clicks=6' ) // we should still be on page 12
238
+ . should ( 'eq' , ` ${ BASE } / 12?clicks=6` ) // we should still be on page 12
237
239
238
240
cy . rightArrow ( )
239
241
. url ( )
240
- . should ( 'eq' , 'http://localhost:3030/13' )
242
+ . should ( 'eq' , ` ${ BASE } /13` )
241
243
242
244
cy . get ( '#slideshow .slidev-page-13 .cy-wrapdecorate > ul > .slidev-vclick-target.slidev-vclick-hidden' )
243
245
. should ( 'have.text' , 'AEFZ' )
0 commit comments