We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a0d228 commit 54bec39Copy full SHA for 54bec39
1 file changed
cypress/support/commands.js
@@ -53,7 +53,15 @@ Cypress.Commands.add('login', (path) => {
53
cy.get('input[name="password"]').type('Abc12345678');
54
cy.get('button[type="submit"]').click();
55
cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200);
56
+
57
+ // Sometimes the page hangs after logging in.
58
+ // If this happens we reload the page and log in again.
59
cy.reload();
60
+ cy.get('body').then(($b) => {
61
+ if ($b.text().includes('Log in to your Strapi account')) {
62
+ cy.login();
63
+ }
64
+ });
65
}
66
// Register
67
if ($body.text().includes('Credentials are only used to authenticate in Strapi')) {
0 commit comments