Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Guest Customer tests #91

Merged
merged 2 commits into from
Oct 5, 2022
Merged

Conversation

gregor-RW
Copy link
Contributor

@gregor-RW gregor-RW commented Oct 3, 2022

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

logout() method refactored so its independent of the current state of the customer (logged in or guest).
Call Account.logout() inside of beforeEach to make tests independent.
Remove logout steps from second test as they are not needed anymore.
@gregor-RW gregor-RW changed the title Make Guest Customer tests Refactor Guest Customer tests Oct 3, 2022
@gregor-RW gregor-RW temporarily deployed to ci October 3, 2022 10:48 Inactive
@peterjaap
Copy link
Contributor

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

@gregor-RW
Copy link
Contributor Author

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: <nav.absolute.right-0.z-20.hidden.w-40.py-2.mt-2.-mr-4.px-1.overflow-auto.origin-top-right.rounded-sm.shadow-lg.sm:w-48.lg:mt-3.bg-container-lighter> 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: <nav.absolute.right-0.z-20.hidden.w-40.py-2.mt-2.-mr-4.px-1.overflow-auto.origin-top-right.rounded-sm.shadow-lg.sm:w-48.lg:mt-3.bg-container-lighter> 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)

  1. 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
Copy link
Contributor

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

@peterjaap peterjaap merged commit 868787e into elgentos:main Oct 5, 2022
@gregor-RW gregor-RW deleted the patch-5 branch October 5, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants