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

dmirano/4147-cypress-component-testing #4174

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

mirano-darren
Copy link
Contributor

Resolves #4147

Description

Adds content to the ContractorResources component test. Overall component testing in Cypress is really straight forward. Would recommend moving forward with it. Would be even better if we could figure out a way for these component tests to count towards code coverage.

Significant changes or possible side effects

None, only changed the test file

Automated test cases written

ContractorResources.js

Steps to manually verify this change

  1. open Cypress with yarn cy:open in /e2e/
  2. Make sure to select component testing, when the Cypress UI shows up
  3. Click on ContractorResources, should be the only test
  4. Verify the test passes

This pull request is ready to review when

  • Automated tests are updated (and all tests are passing)
  • Pull request has been labeled, if applicable with feature, content, bug, tests, refactor
  • Associated OpenAPI documentation has been updated
  • The experience passes a basic manual accessibility audit (keyboard nav, screenreader, text scaling) OR an exemption is documented

This pull request can be merged when

  • Code has been reviewed by someone other than the original author
  • QA has verified the accessibility and functionality related to the change
  • Design has approved the experience
  • Product has approved the experience

@mirano-darren mirano-darren added Development Issues for the dev team resolve tests PR label for release log labels Jun 30, 2022
@cms-eapd-bot
Copy link

cms-eapd-bot commented Jun 30, 2022

This deploy was cleaned up.

cy.contains('Private Contractor Costs').should('exist');

// Getting an uncaught:exception on save:
// TypeError: Cannot destructure property 'keyPersonnel' of 'bigState.apd.data.keyStatePersonnel' as it is undefined.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way you can provide a keyPersonnel? Tif mentioned yesterday that the budget calculation is likely running so you may need to provide some minimum pieces of state to satisfy the budget calculation running.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea there is, it's possible to put it in the initial state passed. However I did try that, and ultimately got another error I couldn't get passed. We can take a deep dive into it once we start using cypress for component testing more

@mirano-darren mirano-darren merged commit 0182753 into main Jul 5, 2022
@mirano-darren mirano-darren deleted the dmirano/4147-cypress-component-testing branch July 5, 2022 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development Issues for the dev team resolve tests PR label for release log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing] Try out Cypress component testing
4 participants