elgentos / magento2-cypress-testing-suite

A community-driven Cypress testing suite for Magento 2
MIT License
172 stars 37 forks source link

Refactor Guest Customer tests #91

Closed gregor-RW closed 2 years ago

gregor-RW commented 2 years ago

Introducing Account.logout() into beforeEach to make the Luma Guest Customer tests independent.

peterjaap commented 2 years ago

@gregorRW some tests are failing, are those due to this change?

gregor-RW commented 2 years ago

Hey @peterjaap , From what I can decode - the failed tests from CI#1 are:

1) Account activities Can remove an address: AssertionError: Timed out retrying after 4000ms: Expected to find content: 'You deleted the address.' but never did. at Context.eval (cypress/integration/hyva/user/account.spec.js:146:48)

2) Account activities "before each" hook for "Can change the newsletter subscription": AssertionError: Timed out retrying after 4000ms: Expected to find content: 'My Account' within the element: but never did.

Because this error occurred during a before each hook we are skipping the remaining tests in the current suite: Account activities at Account.isLoggedIn (cypress/page-objects/hyva/account.js:12:43) at Account.login (cypress/page-objects/hyva/account.js:9:13) at Context.eval (cypress/integration/hyva/user/account.spec.js:28:16)

And from CI#2 are:

1) Account activities "before all" hook for "Can use API to login": AssertionError: Timed out retrying after 4000ms: Expected to find content: 'My Account' within the element: but never did.

Because this error occurred during a before all hook we are skipping the remaining tests in the current suite: Account activities at Account.isLoggedIn (cypress/page-objects/hyva/account.js:12:43) at Account.login (cypress/page-objects/hyva/account.js:9:13) at Context.eval (cypress/integration/hyva/user/account.spec.js:22:16)

2) Account activities "after all" hook for "Can use API to login": CypressError: cy.eq() failed because it requires a DOM element.

Both of them are listing hyva/ tests which my changes do not touch.

peterjaap commented 2 years ago

Ok thanks, I'll fix those later. Merging this now!