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

Fix flaky user deletion & redemption cypress test #718

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Dec 1, 2024

The Cypress docs on Actionability state that .click() will wait until the element reaches an "actionable state". This includes a check that the element is not hidden. However, in our tests we see that after visiting a page, a button is deemed "visible" even though it's not visible in the viewport yet.

Here we fix this flaky test. If this kind of behavior occurs more offen, either we use Cypress in a wrong manner or Cypress has a bug. In both cases it might be worth to consider overriding the .click() event by a custom method that calls .should("be.visible").click() instead, but this is something for a future PR (maybe).

Usually `click()` should already do this for us I thought.
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev@eff6ce7). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #718   +/-   ##
======================================
  Coverage       ?   54.30%           
======================================
  Files          ?      170           
  Lines          ?     7348           
  Branches       ?        0           
======================================
  Hits           ?     3990           
  Misses         ?     3358           
  Partials       ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 left a comment

Choose a reason for hiding this comment

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

LGTM.

@Splines Splines merged commit d5a0f09 into dev Dec 3, 2024
6 of 8 checks passed
@Splines Splines deleted the fix/flaky-cypress-test branch December 3, 2024 14:43
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