fix: only reload after login, not after register

pull/166/head
Boaz Poolman 2024-12-30 20:26:14 +00:00
parent 4e81ebe622
commit 7a0d228f77
1 changed files with 1 additions and 2 deletions

View File

@ -53,6 +53,7 @@ Cypress.Commands.add('login', (path) => {
cy.get('input[name="password"]').type('Abc12345678'); cy.get('input[name="password"]').type('Abc12345678');
cy.get('button[type="submit"]').click(); cy.get('button[type="submit"]').click();
cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200); cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200);
cy.reload();
} }
// Register // Register
if ($body.text().includes('Credentials are only used to authenticate in Strapi')) { if ($body.text().includes('Credentials are only used to authenticate in Strapi')) {
@ -64,8 +65,6 @@ Cypress.Commands.add('login', (path) => {
cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200); cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200);
} }
}); });
cy.reload();
}); });
Cypress.Commands.add('navigateToInterface', (path) => { Cypress.Commands.add('navigateToInterface', (path) => {