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

722 wait no longer needed in cypress tests #723

Merged
merged 4 commits into from
Oct 9, 2023

Conversation

Bdegraaf1234
Copy link
Collaborator

Description: Remove unneeded wait commands from cypress tests

Fixes #722

Checklist:

  • The Main workflow has succeeded
  • The Gatling tests have passed
  • I have logged into the portal running locally with default admin credentials
  • I have updated the README files if this change requires documentation update
  • I have commented my code, particularly in hard-to-understand areas

@Bdegraaf1234 Bdegraaf1234 self-assigned this Sep 22, 2023
@Bdegraaf1234 Bdegraaf1234 linked an issue Sep 22, 2023 that may be closed by this pull request
@Bdegraaf1234 Bdegraaf1234 changed the base branch from master to dev September 22, 2023 09:13
@Bdegraaf1234
Copy link
Collaborator Author

Unfortunately, it seems that the need for wait is not removed.

One way to achieve non-arbitrary wait times would be to add guards by intercepting the xhr requests.

cy.intercept("GET", "/api/projects/radar/subjects?size=20&sort=login,desc").as("sort")
cy.get('jhi-subjects #order-by-desc').click();
cy.wait("@sort");

However, this seems like quite a bit more work and the wait times are not that long. I have also failed to find the logic in where the wait commands are needed.

I was able to remove three out of 4 without causing problems here.

@Bdegraaf1234 Bdegraaf1234 changed the base branch from dev to 709-make-managementportal-user-properties-configurable-frontend September 25, 2023 08:41
Base automatically changed from 709-make-managementportal-user-properties-configurable-frontend to dev September 27, 2023 08:00
@blootsvoets
Copy link
Contributor

Failed tests with a lot of try / retry probably will still need the original wait. Once fixed, can this be merged or is it still WIP?

…ent to describe the alternative to cy.wait() I found
@Bdegraaf1234 Bdegraaf1234 marked this pull request as ready for review October 3, 2023 08:10
@Bdegraaf1234
Copy link
Collaborator Author

Turned out to be pretty small changes, I left the alternative wait strategy in with a comment. ready for review

Copy link
Contributor

@blootsvoets blootsvoets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blootsvoets blootsvoets merged commit 007337e into dev Oct 9, 2023
@blootsvoets blootsvoets deleted the 722-wait-no-longer-needed-in-cypress-tests branch October 9, 2023 11:37
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.

Wait no longer needed in cypress tests
2 participants