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

Major version update of cypress to 6.0.0 #5388

Merged
merged 18 commits into from
Dec 7, 2020

Conversation

lynzt
Copy link
Contributor

@lynzt lynzt commented Dec 2, 2020

Description

This PR updates cypress to ^6.0.0 and makes changes according to the Migration Guide:

  • A few tests that were using should('not.be.visible') to assert an element that doesn't exist were updated to use should('not.exist') instead
  • Use cy.intercept instead of cy.route and removed the fetch deletion command since window.fetch is now supported
  • Commented out spying on network calls to /internal/uploads which were causing server errors, most likely because of this open bug: cy.intercept on file upload endpoints seems to be reading the file stream, which can result in server-side throwing error cypress-io/cypress#9534
    • This was only an issue on upload endpoints that we were spying on, which were just in the PPM upload weight ticket flow. Other upload endpoints were not being spied on, and still work fine. There are still assertions made about the completion of the upload, so the upload itself is still being tested, it's just not spying on the network request.

Reviewer Notes

If the Cypress tests pass in CI then this PR should be good to go!

Code Review Verification Steps

  • If the change is risky, it has been tested in experimental before merging.
  • Code follows the guidelines for Logging
  • The requirements listed in
    Querying the Database Safely
    have been satisfied.
  • Any new migrations/schema changes:
    • Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
    • Have been communicated to #g-database
    • Secure migrations have been tested following the instructions in our docs
  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • User facing changes have been reviewed by design.
  • Request review from a member of a different team.
  • Have the Jira acceptance criteria been met for this change?

References

@robot-mymove
Copy link

robot-mymove commented Dec 2, 2020

Warnings
⚠️ Please add the JIRA issue key to the PR title (e.g. MB-123)

Generated by 🚫 dangerJS against 171a574

@suzubara suzubara changed the title [WIP] Major version update of cypress to 6.0.0 Major version update of cypress to 6.0.0 Dec 4, 2020
@suzubara suzubara marked this pull request as ready for review December 4, 2020 23:19
Copy link
Contributor Author

@lynzt lynzt left a comment

Choose a reason for hiding this comment

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

just a few comments comments we could clean up but LGTM!
🚢

@@ -190,6 +190,7 @@ function serviceMemberAddsWeightTicketSetWithMissingDocuments(hasAnother = false
cy.get('input[name="full_weight"]').type('5000');
cy.upload_file('[data-testid=full-weight-upload] .filepond--root', 'top-secret.png');
// cy.wait('@postUploadDocument').its('response.statusCode').should('eq', 201);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove the commented out wait and other commented out lines in this file?
and I assume we were failing because there was a timing issue w/ the upload?

Copy link

Choose a reason for hiding this comment

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

I was leaving these in because we should be able to uncomment them once Cypress fixes the bug (cypress-io/cypress#9359)

@@ -302,12 +303,12 @@ function serviceMemberSubmitsWeightTicket(vehicleType, hasAnother = true, ordina
cy.get('input[name="empty_weight"]').type('1000');

cy.upload_file('[data-testid=empty-weight-upload] .filepond--root', 'top-secret.png');
cy.wait('@postUploadDocument');
// cy.wait('@postUploadDocument').its('response.statusCode').should('eq', 201);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

delete these and other similar comments in this file?

Copy link

@suzubara suzubara left a comment

Choose a reason for hiding this comment

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

@lynzt looked at my changes and gave a ✅ (was unable to do the review herself since she opened the initial PR)

@suzubara suzubara merged commit be0bcc8 into master Dec 7, 2020
@suzubara suzubara deleted the lt-update-cypress-6.0.0-MB-5717 branch December 7, 2020 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants