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

src/components/__tests__: in FormRegisterCoordinator correct command sequencing and message visibility checks #712

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maceksimon
Copy link
Contributor

Issue: FormRegisterCoordinator component tests occasionally fail with following problems:

  1) <FormRegisterCoordinator>
       desktop
         validates checkboxes correctly:
     AssertionError: Timed out retrying after 60000ms: Expected to find element: `.q-field__messages`, but never found it. 

...

  2) <FormRegisterCoordinator>
       desktop
         submits form correctly:
     CypressError: Timed out retrying after 5000ms: `cy.wait()` timed out waiting `5000ms` for the 1st request to the route: `registerCoordinator`. No request ever occurred.

Solution:

  1. Switch to a more robust check for UI messages using cy.contains to find element by content.
  2. Update sequencing of tests, placing the compareRegisterResponseWithStore function to its own .then block (also add nextTick function before checking for store value).

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.

1 participant