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

First half of asset cypress POM model #5735

Closed
wants to merge 3 commits into from
Closed

First half of asset cypress POM model #5735

wants to merge 3 commits into from

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Jun 21, 2023

WHAT

🤖 Generated by Copilot at fc75b9a

The pull request improves the Cypress test for asset creation by using a page object pattern. It introduces a new AssetPage class that encapsulates the UI logic for creating and interacting with assets. It also adds a data-testid attribute to the submit button in the FacilitiesSelectDialog component to make it easier to locate in the test.

Proposed Changes

  • Fixes #issue?
  • Change 1
  • Change 2
  • More?

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at fc75b9a

  • Refactor the Cypress test for creating an asset to use a page object class (link, link)
  • Import the AssetPage class from cypress/pageobject/Asset/AssetPage.ts (link)
  • Replace the detailed steps with calls to the methods from the AssetPage class (link)
  • Define the AssetPage class with methods for creating and interacting with assets (link)
    • Use Cypress commands and selectors to perform the UI actions and assertions (link)
    • Include methods for selecting the facility, location, asset type, asset class, entering the asset details, clicking the create asset button, and verifying the success notification (link)
  • Add a data-testid attribute to the submit button in the FacilitiesSelectDialog component (link)
    • Make the button easier to locate and interact with in the Cypress test (link)
    • Use the recommended way to add test-specific identifiers to UI elements (link)

@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 2:46pm

@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for care-egov-staging failed.

Name Link
🔨 Latest commit fd22035
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64930cfac050750008e45ade

@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Jun 21, 2023
@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for care-net failed.

Name Link
🔨 Latest commit fd22035
🔍 Latest deploy log https://app.netlify.com/sites/care-net/deploys/64930cfad4186800080834f9

@github-actions github-actions bot added the Deploy-Failed Deplyment is not showing preview label Jun 21, 2023
@nihal467 nihal467 closed this Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cypress failed pull request with cypress test failure Deploy-Failed Deplyment is not showing preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant