Skip to content

Commit

Permalink
Fix sign in timing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinwy committed Jul 17, 2024
1 parent af8cff2 commit bd9d698
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions tests/cypress/e2e/checkout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
describe('KOMOJU for WooCommerce: Checkout', () => {
beforeEach(() => {
cy.installWordpress();
cy.signinToWordpress();
cy.installWooCommerce();
cy.installKomoju();
cy.signinToWordpress().then(() => {
cy.installWooCommerce();
cy.installKomoju();
});
})

it('lets me make a payment using the specialized konbini gateway', () => {
Expand Down
7 changes: 4 additions & 3 deletions tests/cypress/e2e/refunded-webhook.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
describe("KOMOJU for WooCommerce: Refunded webhook", () => {
beforeEach(() => {
cy.installWordpress();
cy.signinToWordpress();
cy.installWooCommerce();
cy.installKomoju();
cy.signinToWordpress().then(() => {
cy.installWooCommerce();
cy.installKomoju();
});
});

it("sets an order as a refunded based on incoming refunded webhook", () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Cypress.Commands.add('signinToWordpress', () => {
return;
}
cy.log('Logging in');
cy.get('#user_login').should('be.visible').clear().type('degica');
cy.get('#user_pass').should('be.visible').clear().type('deg1kaX7reme!');
cy.get('#user_login').should('be.visible').clear().type('Jae');
cy.get('#user_pass').should('be.visible').clear().type('DegicaDegica');
cy.get('#wp-submit').should('be.visible').click();
});
});
Expand Down

0 comments on commit bd9d698

Please sign in to comment.