Skip to content

Commit

Permalink
add drush cr in case drush uli complains
Browse files Browse the repository at this point in the history
  • Loading branch information
vassilyp committed Mar 6, 2024
1 parent 9fc0049 commit 1de76b0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cypress/e2e/helpers/helpers.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ Cypress.Commands.add('doLogin', () => {
cy.session("Login", () => {
cy.drush("user:login --uri=" + Cypress.config('baseUrl'))
.then(function (url) {
cy.visit(url);
try{
cy.visit(url);
} catch (err) {
// Run drush cr if error
cy.drush("lando drush cr").then((url) => {
cy.visit(url);
});
}
});
});
});

0 comments on commit 1de76b0

Please sign in to comment.