File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ declare global {
5050 * @returns Chainable reference to allow CSRF token to also be sent in header.
5151 */
5252 createCSRFCookie ( ) : Chainable < any > ;
53+
54+ /**
55+ * Click accept in the Orejime cookie popup
56+ * */
57+ acceptOrejimePopup ( ) : typeof acceptOrejimePopup ;
5358 }
5459 }
5560}
@@ -106,6 +111,9 @@ function loginViaForm(email: string, password: string): void {
106111 cy . get ( '[data-test="password"]' ) . type ( password ) ;
107112 // Click login button
108113 cy . get ( '[data-test="login-button"]' ) . click ( ) ;
114+
115+ // wait for the browse to redirect to the reload page, and back
116+ cy . acceptOrejimePopup ( ) ;
109117}
110118// Add as a Cypress command (i.e. assign to 'cy.loginViaForm')
111119Cypress . Commands . add ( 'loginViaForm' , loginViaForm ) ;
@@ -173,3 +181,13 @@ function createCSRFCookie(): Cypress.Chainable {
173181}
174182// Add as a Cypress command (i.e. assign to 'cy.createCSRFCookie')
175183Cypress . Commands . add ( 'createCSRFCookie' , createCSRFCookie ) ;
184+
185+ /**
186+ * Click accept in te Orejime cookie popup
187+ */
188+ function acceptOrejimePopup ( ) : void {
189+ cy . get ( '.orejime-Notice-saveButton' ) . click ( ) ;
190+ }
191+ Cypress . Commands . add ( 'acceptOrejimePopup' , acceptOrejimePopup ) ;
192+
193+
You can’t perform that action at this time.
0 commit comments