@@ -92,7 +92,7 @@ describe("Adgangsplatformen", () => {
92
92
cy . get ( ".footer" ) . should ( "not.exist" ) ;
93
93
} ) ;
94
94
95
- it ( "can register a new user and expose the right tokens for the react apps" , ( ) => {
95
+ it ( "can register a new user - expose the right tokens for the react apps - and force logout. " , ( ) => {
96
96
cy . setupAdgangsplatformenRegisterMappinngs ( {
97
97
authorizationCode : "7c5e3213aea6ef42ec97dfeaa6f5b1d454d856dc" ,
98
98
accessToken : "447131b0a03fe0421204c54e5c21a60-new-user" ,
@@ -120,12 +120,12 @@ describe("Adgangsplatformen", () => {
120
120
cy . get ( '[data-cy="pincode-confirm-input"]' ) . type ( "1234" ) ;
121
121
cy . get ( "#branches-dropdown" ) . select ( "DK-775100" ) ;
122
122
cy . get ( '[data-cy="complete-user-registration-button"]' ) . click ( ) ;
123
- cy . request ( "/dpl-react/user-tokens" ) . then ( ( response ) => {
124
- expect ( response . body ) . contain (
125
- 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("user ", "447131b0a03fe0421204c54e5c21a60-new-user")'
126
- ) ;
127
- expect ( response . body ) . not . contain (
128
- 'window.dplReact = window.dplReact || {};\nwindow.dplReact.setToken("unregistered-user", "447131b0a03fe0421204c54e5c21a60-new-user")'
123
+ cy . get ( '[data-cy="button"]' ) . click ( ) ;
124
+ cy . origin ( "login.bib.dk" , ( ) => {
125
+ cy . url ( ) . should ( "to.match ", / ^ h t t p s : \/ \/ l o g i n . b i b . d k \/ l o g o u t \? . * / ) ;
126
+ cy . url ( ) . should (
127
+ "to.match" ,
128
+ / . * r e d i r e c t _ u r i = . * \/ l o g i n % 3 F c u r r e n t - p a t h % 3 D \/ v e l k o m m e n . * /
129
129
) ;
130
130
} ) ;
131
131
} ) ;
0 commit comments