@@ -10,9 +10,16 @@ describe('Client tests', () => {
1010 fixture : 'awaiting-bind-key-response.json' ,
1111 } ) . as ( 'bindKey' ) ;
1212
13+ cy . intercept ( 'GET' , '**/config.json' , {
14+ statusCode : 200 ,
15+ fixture : 'config.json' ,
16+ } ) . as ( 'config' ) ;
17+
1318 cy . visit ( '/' ) ;
1419
15- cy . wait ( '@bindKey' ) ;
20+ // After this point we assume the config file is served from the browser
21+ // cache, since it the nginx setup has a 1h caching set for config.json.
22+ cy . wait ( [ '@bindKey' , '@config' ] ) ;
1623
1724 cy . get ( '.bind-key' ) . should ( 'exist' ) ;
1825 cy . get ( '.bind-key' )
@@ -26,11 +33,6 @@ describe('Client tests', () => {
2633 fixture : 'screen-response.json' ,
2734 } ) . as ( 'bindKey' ) ;
2835
29- cy . intercept ( 'GET' , '**/config.json' , {
30- statusCode : 200 ,
31- fixture : 'config.json' ,
32- } ) . as ( 'config' ) ;
33-
3436 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
3537 statusCode : 200 ,
3638 fixture : 'screen-empty.json' ,
@@ -55,7 +57,6 @@ describe('Client tests', () => {
5557
5658 cy . wait ( [
5759 '@bindKey' ,
58- '@config' ,
5960 '@screen' ,
6061 '@groups' ,
6162 '@campaigns' ,
@@ -71,11 +72,6 @@ describe('Client tests', () => {
7172 fixture : 'screen-response.json' ,
7273 } ) . as ( 'bindKey' ) ;
7374
74- cy . intercept ( 'GET' , '**/config.json' , {
75- statusCode : 200 ,
76- fixture : 'config.json' ,
77- } ) . as ( 'config' ) ;
78-
7975 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
8076 statusCode : 200 ,
8177 fixture : 'screen.json' ,
@@ -124,7 +120,7 @@ describe('Client tests', () => {
124120
125121 cy . wait ( [
126122 '@bindKey' ,
127- '@config' ,
123+ // '@config',
128124 '@screen' ,
129125 '@groups' ,
130126 '@campaigns' ,
@@ -147,11 +143,6 @@ describe('Client tests', () => {
147143 fixture : 'screen-response.json' ,
148144 } ) . as ( 'bindKey' ) ;
149145
150- cy . intercept ( 'GET' , '**/config.json' , {
151- statusCode : 200 ,
152- fixture : 'config.json' ,
153- } ) . as ( 'config' ) ;
154-
155146 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
156147 statusCode : 200 ,
157148 fixture : 'screen.json' ,
@@ -180,7 +171,6 @@ describe('Client tests', () => {
180171 cy . visit ( '/' ) ;
181172 cy . wait ( [
182173 '@bindKey' ,
183- '@config' ,
184174 '@screen' ,
185175 '@groups' ,
186176 '@campaigns' ,
@@ -200,11 +190,6 @@ describe('Client tests', () => {
200190 fixture : 'screen-response.json' ,
201191 } ) . as ( 'bindKey' ) ;
202192
203- cy . intercept ( 'GET' , '**/config.json' , {
204- statusCode : 201 ,
205- fixture : 'config.json' ,
206- } ) . as ( 'config' ) ;
207-
208193 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
209194 statusCode : 201 ,
210195 fixture : 'screen.json' ,
@@ -247,7 +232,6 @@ describe('Client tests', () => {
247232 cy . visit ( '/' ) ;
248233 cy . wait ( [
249234 '@bindKey' ,
250- '@config' ,
251235 '@screen' ,
252236 '@screen-groups' ,
253237 '@screen-campaigns' ,
@@ -272,11 +256,6 @@ describe('Client tests', () => {
272256 fixture : 'screen-response.json' ,
273257 } ) . as ( 'bindKey' ) ;
274258
275- cy . intercept ( 'GET' , '**/config.json' , {
276- statusCode : 201 ,
277- fixture : 'config.json' ,
278- } ) . as ( 'config' ) ;
279-
280259 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
281260 statusCode : 201 ,
282261 fixture : 'screen.json' ,
@@ -333,7 +312,6 @@ describe('Client tests', () => {
333312 cy . visit ( '/' ) ;
334313 cy . wait ( [
335314 '@bindKey' ,
336- '@config' ,
337315 '@screen' ,
338316 '@groups' ,
339317 '@campaigns' ,
@@ -356,11 +334,6 @@ describe('Client tests', () => {
356334 fixture : 'screen-response.json' ,
357335 } ) . as ( 'bindKey' ) ;
358336
359- cy . intercept ( 'GET' , '**/config.json' , {
360- statusCode : 201 ,
361- fixture : 'config.json' ,
362- } ) . as ( 'config' ) ;
363-
364337 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
365338 statusCode : 201 ,
366339 fixture : 'screen.json' ,
@@ -417,7 +390,6 @@ describe('Client tests', () => {
417390 cy . visit ( '/' ) ;
418391 cy . wait ( [
419392 '@bindKey' ,
420- '@config' ,
421393 '@screen' ,
422394 '@groups' ,
423395 '@campaigns' ,
@@ -440,11 +412,6 @@ describe('Client tests', () => {
440412 fixture : 'screen-response.json' ,
441413 } ) . as ( 'bindKey' ) ;
442414
443- cy . intercept ( 'GET' , '**/config.json' , {
444- statusCode : 201 ,
445- fixture : 'config.json' ,
446- } ) . as ( 'config' ) ;
447-
448415 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
449416 statusCode : 201 ,
450417 fixture : 'screen-diff-layout.json' ,
@@ -493,7 +460,11 @@ describe('Client tests', () => {
493460 } ) . as ( 'layout' ) ;
494461
495462 cy . visit ( '/' ) ;
496- cy . wait ( [ '@bindKey' , '@config' , '@screen' , '@layout' ] ) ;
463+ cy . wait ( [
464+ '@bindKey' ,
465+ '@screen' ,
466+ '@layout' ,
467+ ] ) ;
497468
498469 cy . get ( '.region' )
499470 . eq ( 0 )
@@ -511,11 +482,6 @@ describe('Client tests', () => {
511482 fixture : 'screen-response.json' ,
512483 } ) . as ( 'bindKey' ) ;
513484
514- cy . intercept ( 'GET' , '**/config.json' , {
515- statusCode : 201 ,
516- fixture : 'config.json' ,
517- } ) . as ( 'config' ) ;
518-
519485 cy . intercept ( 'GET' , '**/screens/01FYEDW1N133SG516JVJ3VG5FY' , {
520486 statusCode : 201 ,
521487 fixture : 'screen.json' ,
@@ -577,7 +543,6 @@ describe('Client tests', () => {
577543 cy . visit ( '/' ) ;
578544 cy . wait ( [
579545 '@bindKey' ,
580- '@config' ,
581546 '@screen' ,
582547 '@groups' ,
583548 '@campaigns' ,
0 commit comments