@@ -89,8 +89,8 @@ describe('Header without dev mode', () => {
89
89
it ( 'should have Open PRs category' , ( ) => {
90
90
useRouter . mockImplementation ( ( ) => {
91
91
return {
92
- pathname : '/openPRs ' ,
93
- query : { } ,
92
+ pathname : '/pull-requests ' ,
93
+ query : { state : 'open' } ,
94
94
} ;
95
95
} ) ;
96
96
render ( < Header /> ) ;
@@ -116,8 +116,8 @@ describe('Header without dev mode', () => {
116
116
it ( 'should have Stale PRs category' , ( ) => {
117
117
useRouter . mockImplementation ( ( ) => {
118
118
return {
119
- pathname : '/stale-pr ' ,
120
- query : { } ,
119
+ pathname : '/pull-requests ' ,
120
+ query : { state : 'stale' } ,
121
121
} ;
122
122
} ) ;
123
123
render ( < Header /> ) ;
@@ -239,8 +239,6 @@ describe('Header with dev mode', () => {
239
239
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
240
240
const standupElement = screen . getByText ( 'Standup' ) ;
241
241
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
242
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
243
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
244
242
245
243
expect ( taskElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
246
244
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -250,8 +248,6 @@ describe('Header with dev mode', () => {
250
248
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
251
249
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
252
250
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
253
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
254
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
255
251
} ) ;
256
252
257
253
it ( 'should have Issues category' , ( ) => {
@@ -270,8 +266,6 @@ describe('Header with dev mode', () => {
270
266
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
271
267
const standupElement = screen . getByText ( 'Standup' ) ;
272
268
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
273
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
274
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
275
269
276
270
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
277
271
expect ( issueElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
@@ -281,8 +275,6 @@ describe('Header with dev mode', () => {
281
275
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
282
276
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
283
277
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
284
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
285
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
286
278
} ) ;
287
279
288
280
it ( 'should have Mine category' , ( ) => {
@@ -301,8 +293,6 @@ describe('Header with dev mode', () => {
301
293
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
302
294
const standupElement = screen . getByText ( 'Standup' ) ;
303
295
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
304
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
305
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
306
296
307
297
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
308
298
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -312,15 +302,13 @@ describe('Header with dev mode', () => {
312
302
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
313
303
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
314
304
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
315
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
316
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
317
305
} ) ;
318
306
319
307
it ( 'should have Open PRs category' , ( ) => {
320
308
useRouter . mockImplementation ( ( ) => {
321
309
return {
322
- pathname : '/openPRs ' ,
323
- query : { dev : true } ,
310
+ pathname : '/pull-requests ' ,
311
+ query : { state : 'open' , dev : true } ,
324
312
} ;
325
313
} ) ;
326
314
render ( < Header /> ) ;
@@ -332,8 +320,6 @@ describe('Header with dev mode', () => {
332
320
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
333
321
const standupElement = screen . getByText ( 'Standup' ) ;
334
322
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
335
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
336
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
337
323
338
324
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
339
325
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -343,15 +329,13 @@ describe('Header with dev mode', () => {
343
329
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
344
330
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
345
331
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
346
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
347
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
348
332
} ) ;
349
333
350
334
it ( 'should have Stale PRs category' , ( ) => {
351
335
useRouter . mockImplementation ( ( ) => {
352
336
return {
353
- pathname : '/stale-pr ' ,
354
- query : { dev : true } ,
337
+ pathname : '/pull-requests ' ,
338
+ query : { state : 'stale' , dev : true } ,
355
339
} ;
356
340
} ) ;
357
341
render ( < Header /> ) ;
@@ -363,8 +347,6 @@ describe('Header with dev mode', () => {
363
347
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
364
348
const standupElement = screen . getByText ( 'Standup' ) ;
365
349
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
366
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
367
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
368
350
369
351
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
370
352
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -374,8 +356,6 @@ describe('Header with dev mode', () => {
374
356
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
375
357
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
376
358
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
377
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
378
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
379
359
} ) ;
380
360
381
361
it ( 'should have Idle Users category' , ( ) => {
@@ -394,8 +374,6 @@ describe('Header with dev mode', () => {
394
374
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
395
375
const standupElement = screen . getByText ( 'Standup' ) ;
396
376
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
397
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
398
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
399
377
400
378
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
401
379
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -405,8 +383,6 @@ describe('Header with dev mode', () => {
405
383
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
406
384
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
407
385
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
408
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
409
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
410
386
} ) ;
411
387
412
388
it ( 'should have Standup category' , ( ) => {
@@ -425,8 +401,6 @@ describe('Header with dev mode', () => {
425
401
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
426
402
const standupElement = screen . getByText ( 'Standup' ) ;
427
403
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
428
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
429
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
430
404
431
405
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
432
406
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -436,8 +410,6 @@ describe('Header with dev mode', () => {
436
410
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
437
411
expect ( standupElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
438
412
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
439
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
440
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
441
413
} ) ;
442
414
443
415
it ( 'should have Availability Panel category' , ( ) => {
@@ -456,8 +428,6 @@ describe('Header with dev mode', () => {
456
428
const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
457
429
const standupElement = screen . getByText ( 'Standup' ) ;
458
430
const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
459
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
460
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
461
431
462
432
expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
463
433
expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
@@ -467,69 +437,5 @@ describe('Header with dev mode', () => {
467
437
expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
468
438
expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
469
439
expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
470
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
471
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
472
- } ) ;
473
-
474
- it ( 'should have Open PRs Dev category' , ( ) => {
475
- useRouter . mockImplementation ( ( ) => {
476
- return {
477
- pathname : '/pull-requests' ,
478
- query : { state : 'open' , dev : true } ,
479
- } ;
480
- } ) ;
481
- render ( < Header /> ) ;
482
- const taskElement = screen . getByText ( 'Tasks' ) ;
483
- const issueElement = screen . getByText ( 'Issues' ) ;
484
- const mineElement = screen . getByText ( 'Mine' ) ;
485
- const openPRElement = screen . getByText ( 'Open PRs' ) ;
486
- const stalePRElement = screen . getByText ( 'Stale PRs' ) ;
487
- const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
488
- const standupElement = screen . getByText ( 'Standup' ) ;
489
- const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
490
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
491
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
492
-
493
- expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
494
- expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
495
- expect ( mineElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
496
- expect ( openPRElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
497
- expect ( stalePRElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
498
- expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
499
- expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
500
- expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
501
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
502
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
503
- } ) ;
504
-
505
- it ( 'should have Stale PRs Dev category' , ( ) => {
506
- useRouter . mockImplementation ( ( ) => {
507
- return {
508
- pathname : '/pull-requests' ,
509
- query : { state : 'stale' , dev : true } ,
510
- } ;
511
- } ) ;
512
- render ( < Header /> ) ;
513
- const taskElement = screen . getByText ( 'Tasks' ) ;
514
- const issueElement = screen . getByText ( 'Issues' ) ;
515
- const mineElement = screen . getByText ( 'Mine' ) ;
516
- const openPRElement = screen . getByText ( 'Open PRs' ) ;
517
- const stalePRElement = screen . getByText ( 'Stale PRs' ) ;
518
- const idleUsersElement = screen . getByText ( 'Idle Users' ) ;
519
- const standupElement = screen . getByText ( 'Standup' ) ;
520
- const availabilityElement = screen . getByText ( 'Availability Panel' ) ;
521
- const openPRDevElement = screen . getByText ( 'Open PRs(dev)' ) ;
522
- const stalePRDevElement = screen . getByText ( 'Stale PRs(dev)' ) ;
523
-
524
- expect ( taskElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
525
- expect ( issueElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
526
- expect ( mineElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
527
- expect ( openPRElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
528
- expect ( stalePRElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
529
- expect ( idleUsersElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
530
- expect ( standupElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
531
- expect ( availabilityElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
532
- expect ( openPRDevElement . classList . contains ( 'active' ) ) . toBeFalsy ( ) ;
533
- expect ( stalePRDevElement . classList . contains ( 'active' ) ) . toBeTruthy ( ) ;
534
440
} ) ;
535
441
} ) ;
0 commit comments