@@ -139,11 +139,9 @@ msTest('Go through custom org creation process', { tag: '@important' }, async ({
139139 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
140140
141141 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
142- await expect ( authRadio ) . toHaveCount ( 3 ) ;
143- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
144- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
145- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
146- await authRadio . nth ( 1 ) . click ( ) ;
142+ await expect ( authRadio ) . toHaveCount ( 4 ) ;
143+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : true , keyringDisabled : true } ) ;
144+ await authRadio . nth ( 0 ) . click ( ) ;
147145
148146 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 0 ) , DEFAULT_USER_INFORMATION . password ) ;
149147 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
@@ -280,11 +278,8 @@ msTest('Go through custom org creation process from bootstrap link', async ({ co
280278 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
281279
282280 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
283- await expect ( authRadio ) . toHaveCount ( 3 ) ;
284- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
285- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
286- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
287- await authRadio . nth ( 1 ) . click ( ) ;
281+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : true , keyringDisabled : true } ) ;
282+ await authRadio . nth ( 0 ) . click ( ) ;
288283
289284 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 0 ) , DEFAULT_USER_INFORMATION . password ) ;
290285 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
@@ -418,11 +413,8 @@ for (const displaySize of ['small', 'large']) {
418413 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
419414
420415 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
421- await expect ( authRadio ) . toHaveCount ( 3 ) ;
422- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
423- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
424- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
425- await authRadio . nth ( 1 ) . click ( ) ;
416+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : true , keyringDisabled : true } ) ;
417+ await authRadio . nth ( 0 ) . click ( ) ;
426418 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 0 ) , DEFAULT_USER_INFORMATION . password ) ;
427419 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
428420 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 1 ) , DEFAULT_USER_INFORMATION . password ) ;
@@ -554,11 +546,8 @@ for (const displaySize of ['small', 'large']) {
554546 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
555547
556548 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
557- await expect ( authRadio ) . toHaveCount ( 3 ) ;
558- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
559- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
560- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
561- await authRadio . nth ( 1 ) . click ( ) ;
549+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : true , keyringDisabled : true } ) ;
550+ await authRadio . nth ( 0 ) . click ( ) ;
562551 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 0 ) , DEFAULT_USER_INFORMATION . password ) ;
563552 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
564553 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 1 ) , DEFAULT_USER_INFORMATION . password ) ;
@@ -655,11 +644,8 @@ for (const displaySize of ['small', 'large']) {
655644 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
656645
657646 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
658- await expect ( authRadio ) . toHaveCount ( 3 ) ;
659- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
660- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
661- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
662- await authRadio . nth ( 1 ) . click ( ) ;
647+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : true , keyringDisabled : true } ) ;
648+ await authRadio . nth ( 0 ) . click ( ) ;
663649 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 0 ) , DEFAULT_USER_INFORMATION . password ) ;
664650 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
665651 await fillIonInput ( authContainer . locator ( '.choose-password' ) . locator ( 'ion-input' ) . nth ( 1 ) , DEFAULT_USER_INFORMATION . password ) ;
@@ -775,11 +761,7 @@ msTest.skip('Go through custom org creation process with smartcard auth', async
775761 await expect ( authNext ) . toHaveDisabledAttribute ( ) ;
776762
777763 const authRadio = authContainer . locator ( '.choose-auth-page' ) . locator ( '.radio-list-item:visible' ) ;
778- await expect ( authRadio ) . toHaveCount ( 3 ) ;
779- await expect ( authRadio . nth ( 0 ) ) . toHaveTheClass ( 'radio-disabled' ) ;
780- await expect ( authRadio . nth ( 0 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'System authentication' ) ;
781- await expect ( authRadio . nth ( 1 ) ) . toHaveText ( 'Password' ) ;
782- await expect ( authRadio . nth ( 2 ) . locator ( '.authentication-card-text__title' ) ) . toHaveText ( 'Smartcard' ) ;
764+ await expect ( authRadio ) . toHaveAuthentication ( { pkiDisabled : false , keyringDisabled : true } ) ;
783765 const certBtn = authContainer . locator ( '.choose-certificate-button' ) ;
784766 await expect ( certBtn ) . toBeHidden ( ) ;
785767 await authRadio . nth ( 2 ) . click ( ) ;
@@ -793,7 +775,6 @@ msTest.skip('Go through custom org creation process with smartcard auth', async
793775
794776 await expect ( authNext ) . toNotHaveDisabledAttribute ( ) ;
795777 await authNext . click ( ) ;
796-
797778 const summaryContainer = modal . locator ( '.summary-page' ) ;
798779 const summaryPrevious = modal . locator ( '.summary-page-footer' ) . locator ( 'ion-button' ) . nth ( 0 ) ;
799780 const summaryNext = modal . locator ( '.summary-page-footer' ) . locator ( 'ion-button' ) . nth ( 1 ) ;
0 commit comments