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

add test to search asset by qr and serial number #6266

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Sep 11, 2023

WHAT

🤖 Generated by Copilot at 16b0bd8

This pull request improves the cypress tests for the asset homepage and search features. It refactors the login process, adds more fields and validations to the asset search test, and enhances the AssetSearchPage class with new methods and assertions.

Proposed Changes

@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 16b0bd8

  • Import LoginPage class from Login page object module to use its methods for logging in as different types of users (link)
  • Replace cy.loginByApi method with loginPage.loginAsDistrictAdmin method to log in as a district admin user through the UI instead of using the API (link)
  • Modify test case for searching an asset by name, QR ID, and serial number in asset_homepage.cy.ts file (link)
  • Modify typeSearchKeyword method in AssetSearchPage class to clear the search input field before typing the keyword, and use #search selector instead of [name='search'] selector (link)
  • Add clickAssetByName and verifyBadgeContent methods to AssetSearchPage class to click on an asset with the given name from the asset list, and assert that the badge element has the expected text (link)
  • Add clickUpdateButton, clearAndTypeQRCode, clearAndTypeSerialNumber, clickAssetSubmitButton, visitAssetsPage, and verifyAssetListContains methods to AssetSearchPage class to update the QR ID and serial number of an asset, and verify the changes in the asset list (link)

@vercel
Copy link

vercel bot commented Sep 11, 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 Sep 11, 2023 9:26pm

@netlify
Copy link

netlify bot commented Sep 11, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 824e5ae
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64ff85f8c5082e0008e0f3ae
😎 Deploy Preview https://deploy-preview-6266--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 cypress failed pull request with cypress test failure cypress passed and removed cypress failed pull request with cypress test failure labels Sep 11, 2023
@nihal467 nihal467 marked this pull request as ready for review September 11, 2023 21:26
@nihal467 nihal467 requested a review from a team September 11, 2023 21:27
@nihal467 nihal467 requested a review from a team as a code owner September 11, 2023 21:27
@khavinshankar khavinshankar merged commit 2da1eee into develop Sep 12, 2023
@khavinshankar khavinshankar deleted the cypress-asset-search branch September 12, 2023 04:06
@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.

Add Test to Search Asset by name/QR/serial number
2 participants