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 unit test #26433

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Fix flaky unit test #26433

merged 2 commits into from
Oct 30, 2023

Conversation

Mottie
Copy link
Contributor

@Mottie Mottie commented Oct 27, 2023

Summary

  • (Summarize the changes that have been made to the platform)

    Attempt to fix disallowed (flaky) unit test in our Supplemental Claim form (995)

    <EvidenceVaRecords>
       partial/invalid data navigation
        should show modal, select "No, remove this location", then navigate back to previous index
    
  • (If bug, how to reproduce)

    Unable to duplicate locally; it appears to happen quite often in CI

  • (What is the solution, why is this the solution)

    Move error element checking inside of a RTL waitFor

  • (Which team do you work for, does your team own the maintenance of this component?)

    Benefits decision reviews

  • (If using a flipper, what is the end date of the flipper being required/success criteria being targeted)

Related issue(s)

#67960

Testing done

  • Describe what the old behavior was prior to the change

    Flaky unit test

  • Describe the steps required to verify your changes are working as expected

    Unit test stress test doesn't trigger on this unit test

  • Describe the tests completed and the results

    Updated src/applications/appeals/995/tests/components/EvidenceVaRecords.unit.spec.jsx

  • _Exclusively stating 'Specs and automated tests passing' is NOT acceptable as appropriate testing
  • Optionally, provide a link to your test plan and test execution records

Screenshots

N/A

What areas of the site does it impact?

Supplemental Claim

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.
  • Events are being sent to the appropriate logging solution
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)

Authentication

  • Did you login to a local build and verify all authenticated routes work as expected with a test user

⚠️ Team Sites (only applies to modifications made to the VA.gov header) ⚠️

  • The vets-website header does not contain any web-components
  • I used the proxy-rewrite steps to test the injected header scenario
  • I reached out in the #sitewide-public-websites Slack channel for questions

Requested Feedback

(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@Mottie Mottie added front end bmt-team-1 Benefits Management Tools Team 1 Decision-Reviews-Team SC Supplemental Claim (Decision Reviews) labels Oct 27, 2023
@Mottie Mottie self-assigned this Oct 27, 2023
@Mottie Mottie requested review from a team as code owners October 27, 2023 18:51
@va-vfs-bot va-vfs-bot temporarily deployed to master/26426-unit-tests/main October 27, 2023 19:18 Inactive
Copy link
Contributor

@anniebtran anniebtran left a comment

Choose a reason for hiding this comment

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

tried to replicate the flakiness locally but i also couldn't get it to happen. but i ran the updated tests several times and they all passed... and the solution seems reasonable so LGTM

@Mottie Mottie merged commit 089b965 into main Oct 30, 2023
@Mottie Mottie deleted the 26426-unit-tests branch October 30, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bmt-team-1 Benefits Management Tools Team 1 Decision-Reviews-Team front end SC Supplemental Claim (Decision Reviews)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants