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

Added Cypress Test to verify Asset Filter Functionality #6275

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Sep 12, 2023

WHAT

🤖 Generated by Copilot at 6823d1f

This pull request adds and improves the Cypress tests for the asset filters and search features. It also fixes some bugs and inconsistencies in the page object classes and the UI components related to the asset filters. It modifies the files cypress/pageobject/Asset/AssetFilters.ts, cypress/pageobject/Asset/AssetSearch.ts, cypress/e2e/assets_spec/asset_homepage.cy.ts, src/CAREUI/interactive/SlideOver.tsx, and src/Components/Assets/AssetFilter.tsx.

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 6823d1f

  • Add a new test case to verify the asset filters by location and the functionality of the back button and the clear filters button (link)
  • Add a new parameter assetLocation to the applyAssetFilters method to select the location filter from the advanced filters menu (link, link)
  • Add a new method clearFilters to clear all the applied filters and verify the URL and the API response (link)
  • Add other methods and assertions to the AssetFilters class for the filter texts, the advanced filter button, and the slide over back button (link)
  • Swap the order of the clear and click commands in the typeSearchKeyword method to avoid the issue of the search input not being cleared properly (link)
  • Add an intercept and a wait for the API call to get the asset details in the clickAssetByName method to ensure the asset details page is loaded (link)
  • Add an id attribute to the close button of the slide over component in the SlideOver.tsx file to make it easier to locate and click in the tests (link)
  • Change the name attribute of the location select component in the AssetFilter.tsx file to avoid the conflict with the facility select component and make it consistent with the id attribute (link)

@nihal467 nihal467 requested a review from a team September 12, 2023 18:39
@nihal467 nihal467 requested a review from a team as a code owner September 12, 2023 18:39
@vercel
Copy link

vercel bot commented Sep 12, 2023

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

Name Status Preview Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview Sep 12, 2023 6:39pm

@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 6823d1f
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6500b06fee3d130008c7a870
😎 Deploy Preview https://deploy-preview-6275--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.

@cypress
Copy link

cypress bot commented Sep 12, 2023

Passing run #1234 ↗︎

0 71 0 0 Flakiness 0

Details:

Merge 6823d1f into 8a704af...
Project: CARE Commit: 8c67dd78f3 ℹ️
Status: Passed Duration: 06:58 💡
Started: Sep 12, 2023 6:44 PM Ended: Sep 12, 2023 6:51 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@khavinshankar khavinshankar merged commit f72a1cf into develop Sep 13, 2023
29 checks passed
@khavinshankar khavinshankar deleted the cypress-asset-filter branch September 13, 2023 02:19
@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 Cypress Test to verify Asset Filter Functionality
2 participants