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

Alleviate flaky cypress tests #11686

Merged
merged 10 commits into from May 14, 2024
Merged

Alleviate flaky cypress tests #11686

merged 10 commits into from May 14, 2024

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented May 10, 2024

Description

  • Update Cypress to 12.7.4

  • Clean up funky code

    • We had duplicate code that used different commands, and had commands that were missing the closing square bracket ] so I aligned those.
  • Config updates

    • Bump retries to 2
  • Clear session state on each test

    • Cypress thinks sessions "more accurately represent real-world scenarios". However, we do not have a scenario where a user would log in as both a state user and an admin, and somehow toggle back and forth. Thus clearing sessions when switching logins is the best way to ensure expected behavior for each user (the right fields are enabled/disabled)
  • Rip all the cucumber stuff out

    • Remove .feature files and move .stepdef.js to .cy.js
    • Rework old step definitions to work as tests
    • Consolidate MLR form and release tests
    • Add accessibility tests per standard page type
    • Update config
    • Remove packages and cleanup imports

Related ticket(s)

CMDCT-3602
CMDCT-3337


How to test

No changes to deployed env: https://d2mpyb45d6mx0c.cloudfront.net/

All cypress tests pass every time

I ran the tests six times in a row on this commit and they passed every time.


Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 5004 lines exceeds the maximum allowed for the inline comments feature.

@gmrabian gmrabian marked this pull request as ready for review May 13, 2024 20:20
@gmrabian gmrabian added the ready for review Ready for all the reviews! label May 13, 2024
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 5021 lines exceeds the maximum allowed for the inline comments feature.

Copy link

codeclimate bot commented May 13, 2024

Code Climate has analyzed commit 289fe07 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 95.9% (0.0% change).

View more on Code Climate.

Copy link
Contributor

@ntsummers1 ntsummers1 left a comment

Choose a reason for hiding this comment

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

image

@gmrabian gmrabian merged commit 8036127 into main May 14, 2024
19 checks passed
@gmrabian gmrabian deleted the cmdct-3602-fix-cypress branch May 14, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
2 participants