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

Cypress Test | Facility Creation & Updation | POM Approach #5787

Merged
merged 5 commits into from
Jun 27, 2023

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Jun 27, 2023

WHAT

🤖 Generated by Copilot at 2832329

Refactored the facility and patient tests in cypress/e2e to use a page object model for the facility form. Added a new module cypress/pageobject/Facility/FacilityCreation.ts that defines the FacilityPage class for interacting with the form. Fixed a bug in generating random phone numbers.

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 2832329

  • Refactor facility creation and update tests to use page object model (link, link)
  • Import FacilityPage class from cypress/pageobject/Facility/FacilityCreation.ts and create an instance as facilityPage (link)
  • Remove facility class and current_url variable as they are no longer needed (link, link)
  • Use facilityPage methods to fill and select form fields, submit form, and select location on map (link)
  • Rename describe block to "Facility Creation" and it blocks to "Create a new facility" and "Update the existing facility" (link, link)
  • Introduce facilityUrl variable to store the url of the created facility for the update test (link)
  • Add page object class FacilityPage to encapsulate facility creation and update pages (link)
    • Define FacilityPage class in cypress/pageobject/Facility/FacilityCreation.ts with methods for visiting, filling, selecting, submitting, and locating (link)
    • Export FacilityPage class as the default export of the module (link)

@nihal467 nihal467 requested a review from a team June 27, 2023 16:18
@nihal467 nihal467 requested a review from a team as a code owner June 27, 2023 16:18
@nihal467 nihal467 requested a review from gigincg June 27, 2023 16:18
@vercel
Copy link

vercel bot commented Jun 27, 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 27, 2023 5:15pm

@netlify
Copy link

netlify bot commented Jun 27, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit e8ba687
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/649b18d65ce37100088b7539
😎 Deploy Preview https://deploy-preview-5787--care-egov-staging.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.

@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Jun 27, 2023
@github-actions github-actions bot added cypress passed and removed cypress failed pull request with cypress test failure labels Jun 27, 2023
@khavinshankar khavinshankar merged commit a7fdef2 into develop Jun 27, 2023
@khavinshankar khavinshankar deleted the Facility-pom branch June 27, 2023 17:32
@github-actions
Copy link

@nihal467 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants