@@ -307,13 +307,16 @@ describe('Test Fleet access with RBAC with custom roles using Standard User', {
307
307
cy . login ( stduser , uiPassword ) ;
308
308
309
309
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
310
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
311
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
310
+ cy . continuousDeliveryMenuSelection ( ) ;
311
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
312
+
313
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
314
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
312
315
313
316
// CHECKS IN FLEET-DEFAULT
314
317
// Can't "Create", "Edit" nor "Delete"
315
318
cy . continuousDeliveryMenuSelection ( ) ;
316
- cy . get ( '.btn.role-primary' ) . contains ( 'Create App Bundle' ) . should ( 'not.exist' ) ;
319
+ cy . checkAccessToCreateGitRepoPage ( ) ;
317
320
// Note: listing is checked implictly here
318
321
cy . open3dotsMenu ( repoNameDefault , 'Edit Config' , true ) ;
319
322
cy . open3dotsMenu ( repoNameDefault , 'Delete' , true ) ;
@@ -353,8 +356,11 @@ describe('Test Fleet access with RBAC with custom roles using Standard User', {
353
356
cy . login ( stduser , uiPassword ) ;
354
357
355
358
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
356
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
357
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
359
+ cy . continuousDeliveryMenuSelection ( ) ;
360
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
361
+
362
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
363
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
358
364
359
365
// CHECKS IN FLEET-DEFAULT
360
366
// CAN "Create" repos
@@ -404,8 +410,11 @@ describe('Test Fleet access with RBAC with custom roles using Standard User', {
404
410
cy . login ( stduser , uiPassword ) ;
405
411
406
412
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
407
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
408
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
413
+ cy . continuousDeliveryMenuSelection ( ) ;
414
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
415
+
416
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
417
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
409
418
410
419
// CHECKS IN FLEET-DEFAULT
411
420
// CAN "Create" and "Edit"
@@ -458,13 +467,16 @@ describe('Test Fleet access with RBAC with custom roles using Standard User', {
458
467
cy . login ( stduser , uiPassword ) ;
459
468
460
469
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
461
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
462
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
470
+ cy . continuousDeliveryMenuSelection ( ) ;
471
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
472
+
473
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
474
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
463
475
464
476
// CHECKS IN FLEET-DEFAULT
465
477
cy . continuousDeliveryMenuSelection ( ) ;
466
478
// Can't "Create" repos
467
- cy . get ( '.btn.role-primary' ) . contains ( 'Create App Bundle' ) . should ( 'not.exist' ) ;
479
+ cy . checkAccessToCreateGitRepoPage ( ) ;
468
480
// Cant't "Edit"
469
481
cy . open3dotsMenu ( repoNameDefault , 'Edit Config' , true ) ;
470
482
// CAN "Delete"
@@ -528,19 +540,25 @@ describe('Test Fleet access with RBAC with "CUSTOM ROLES" and "GITREPOS" using "
528
540
cypressLib . logout ( ) ;
529
541
cy . login ( baseUser , uiPassword ) ;
530
542
531
- // CAN go to Continuous Delivery Dashboard and "list" gitrepos
532
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
533
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
534
-
543
+ // CAN go to Continuous Delivery Dashboard/App Bundles page and "list" gitrepos
544
+ // cy.accesMenuSelection('Continuous Delivery', 'Dashboard');
545
+ // cy.get('div.fleet-dashboard-data').should('contain', repoName).and('contain', repoNameDefault);
546
+ cy . continuousDeliveryMenuSelection ( ) ;
547
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
548
+
549
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
550
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
551
+
535
552
// CHECKS IN FLEET-DEFAULT
536
553
// Can't "Create", "Edit" nor "Delete"
537
554
cy . continuousDeliveryMenuSelection ( ) ;
538
- cy . get ( '.btn.role-primary' ) . contains ( 'Create App Bundle' ) . should ( 'not.exist' ) ;
555
+ cy . checkAccessToCreateGitRepoPage ( ) ;
556
+
539
557
// Note: listing is checked implictly here
540
558
cy . open3dotsMenu ( repoNameDefault , 'Edit Config' , true ) ;
541
559
cy . open3dotsMenu ( repoNameDefault , 'Delete' , true ) ;
542
560
543
- // CHECKS IN FLEET-DEFAULT
561
+ // CHECKS IN FLEET-LOCAL
544
562
// Can't "Create", "Edit" nor "Delete"
545
563
cy . fleetNamespaceToggle ( 'fleet-local' ) ;
546
564
cy . open3dotsMenu ( repoName , 'Edit Config' , true ) ;
@@ -575,8 +593,11 @@ describe('Test Fleet access with RBAC with "CUSTOM ROLES" and "GITREPOS" using "
575
593
cy . login ( baseUser , uiPassword ) ;
576
594
577
595
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
578
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
579
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
596
+ cy . continuousDeliveryMenuSelection ( ) ;
597
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
598
+
599
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
600
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
580
601
581
602
// CHECKS IN FLEET-DEFAULT
582
603
// CAN "Create" repos
@@ -626,8 +647,11 @@ describe('Test Fleet access with RBAC with "CUSTOM ROLES" and "GITREPOS" using "
626
647
cy . login ( baseUser , uiPassword ) ;
627
648
628
649
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
629
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
630
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
650
+ cy . continuousDeliveryMenuSelection ( ) ;
651
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
652
+
653
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
654
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
631
655
632
656
// CHECKS IN FLEET-DEFAULT
633
657
// CAN "Create" and "Edit"
@@ -680,13 +704,16 @@ describe('Test Fleet access with RBAC with "CUSTOM ROLES" and "GITREPOS" using "
680
704
cy . login ( baseUser , uiPassword ) ;
681
705
682
706
// CAN go to Continuous Delivery Dashboard and "list" gitrepos
683
- cy . accesMenuSelection ( 'Continuous Delivery' , 'Dashboard' ) ;
684
- cy . get ( 'div.fleet-dashboard-data' ) . should ( 'contain' , repoName ) . and ( 'contain' , repoNameDefault ) ;
707
+ cy . continuousDeliveryMenuSelection ( ) ;
708
+ cy . verifyTableRow ( 0 , 'Active' , repoNameDefault ) ;
709
+
710
+ cy . fleetNamespaceToggle ( 'fleet-local' ) ;
711
+ cy . verifyTableRow ( 0 , 'Active' , repoName ) ;
685
712
686
713
// CHECKS IN FLEET-DEFAULT
687
714
cy . continuousDeliveryMenuSelection ( ) ;
688
715
// Can't "Create" repos
689
- cy . get ( '.btn.role-primary' ) . contains ( 'Create App Bundle' ) . should ( 'not.exist' ) ;
716
+ cy . checkAccessToCreateGitRepoPage ( ) ;
690
717
// Cant't "Edit"
691
718
cy . open3dotsMenu ( repoNameDefault , 'Edit Config' , true ) ;
692
719
// CAN "Delete"
0 commit comments