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

test: add autofill cypress test #4607

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

Conversation

adriencyberspace
Copy link
Collaborator

@adriencyberspace adriencyberspace commented Jan 23, 2025

This PR addresses #3385

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

Please include a summary of the change and which issue(s) is addressed.

How Can This Be Tested/Reviewed?

Provide instructions so we can review, including any needed configuration, and the test cases that need to be QAd.

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@adriencyberspace adriencyberspace changed the title 3385/cypress autofill test test: add autofill cypress test Jan 23, 2025
Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 43099d4
🔍 Latest deploy log https://app.netlify.com/sites/partners-bloom-dev/deploys/6792bed3e7be4100089de10f
😎 Deploy Preview https://deploy-preview-4607--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 43099d4
🔍 Latest deploy log https://app.netlify.com/sites/bloom-exygy-dev/deploys/6792bed3e36f620008fc457f
😎 Deploy Preview https://deploy-preview-4607--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 055715b
🔍 Latest deploy log https://app.netlify.com/sites/partners-bloom-dev/deploys/67995efc6e1b9d0008597fb0
😎 Deploy Preview https://deploy-preview-4607--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 055715b
🔍 Latest deploy log https://app.netlify.com/sites/bloom-exygy-dev/deploys/67995efc641de00008302085
😎 Deploy Preview https://deploy-preview-4607--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

] as ApplicationMultiselectQuestion[],
}

export const autofillBlueSkyApplication: Application = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: the purpose of this is a. some fields are not autofilled, b. blue sky has different fields than elm village and c. the summary checks against the mock data

cy.getByTestId("app-alternate-first-name").type(application.alternateContact.firstName)
cy.getByTestId("app-alternate-last-name").type(application.alternateContact.lastName)
} else {
cy.wait(1000)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: i could not get some steps to work on autofill without using cy.wait(). Open to other solutions but this was the only one I tried that worked


cy.goNext()
cy.checkErrorAlert("not.exist")
cy.checkErrorMessages("not.exist")
cy.isNextRouteValid("alternateContactInfo")

if (autofill && application.householdMember.length > 0) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: I had tried using isNextRouteValid("alternateContactInfo", autofill ? 1 : 0) but I was only passing the test about 60-70% of the time. The error was always in the autofill app, in which the test was expecting to be on the step prior despite having already been on that step and pressing next.

@adriencyberspace adriencyberspace added the 1 review needed Requires 1 more review before ready to merge label Jan 28, 2025
@emilyjablonski
Copy link
Collaborator

emilyjablonski commented Jan 29, 2025

Heya @adriencyberspace ! Do you mind filling out the PR template description? With some background on the goal here and any technical choices you made if there's any relevant ones. It doesn't have to be long. The "how can we test this" section is more self-explanatory on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 review needed Requires 1 more review before ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants