Skip to content

Commit

Permalink
Avoid cypress issues hanging on visit in beforeEach
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Defty committed Apr 15, 2020
1 parent e9225eb commit e5187b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ const commands = {
},

visitAdmin(options = {}) {
cy.visit('/');
cy.visit('/wp-admin/index.php', options);
},

// Posts
editPost(id, options = {}) {
cy.visit('/');
cy.visit(`/wp-admin/post.php?post=${id}&action=edit`, options);
},

Expand Down
1 change: 0 additions & 1 deletion lib/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ before(() => {

beforeEach(() => {
Cypress.currentTest.retries(2);
cy.visit('/');
});

Cypress.on('uncaught:exception', () => false);
Expand Down

0 comments on commit e5187b3

Please sign in to comment.