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 Cypress test to Assets Export Functionality #6291

Merged
merged 5 commits into from
Sep 15, 2023

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Sep 14, 2023

WHAT

🤖 Generated by Copilot at ca73772

This pull request improves the asset management feature and its test coverage. It adds location-based filtering, importing, and exporting of assets, and fixes some bugs and inconsistencies in the UI and the test code. It also refactors and enhances the cypress test cases and page objects for the asset feature, and adds id attributes to some UI elements to make them easier to select in the tests. The changes affect the files cypress/e2e/assets_spec/*.cy.ts, cypress/pageobject/Asset/*.ts, src/Components/Assets/*.tsx, and src/CAREUI/interactive/SlideOver.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 ca73772

  • Add and update test cases for creating, editing, importing, and exporting assets (link, link, link, link, link, link, link)
  • Use AssetPage class methods to perform actions and assertions on asset creation, editing, importing, and exporting (link, link, link)
  • Use AssetFilters class methods to apply and clear filters by location and other criteria (link, link, link)
  • Use AssetSearchPage class methods to search and select assets by name (link)
  • Use uuidv4 function to generate unique identifiers for assets (link)
  • Move test cases for creating, editing, and importing assets from assets_manage.cy.ts to assets_creation.cy.ts and asset_homepage.cy.ts (link, link)
  • Add test cases for exporting assets in JSON and CSV formats (link)
  • Add intercepts and waits for asset API calls to ensure data loading (link)
  • Add and modify id and name attributes to asset components for selecting elements in test cases (link, link, link, link, link)
    • Add id attribute to close button of slide over component in SlideOver.tsx (link)
    • Change name attribute of location select component in AssetFilter.tsx (link)
    • Add id attribute to export asset button in AssetManage.tsx (link)
    • Add id attributes to export JSON and CSV options in AssetsList.tsx (link, link)
  • Modify imports and method names in AssetCreation.ts and AssetSearch.ts files (link, link, link)
    • Import AssetPage class from AssetCreation.ts file in asset_homepage.cy.ts and assets_creation.cy.ts files (link, link)
    • Remove unused imports of AssetSearchPage and uuidv4 from assets_manage.cy.ts file (link)
    • Change method name selectImportOption to selectassetimportbutton in AssetPage class (link)
    • Clear search input before typing keyword in typeSearchKeyword method of AssetSearchPage class (link)

@nihal467 nihal467 requested a review from a team September 14, 2023 16:08
@nihal467 nihal467 requested a review from a team as a code owner September 14, 2023 16:08
@vercel
Copy link

vercel bot commented Sep 14, 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 15, 2023 0:15am

@netlify
Copy link

netlify bot commented Sep 14, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 948e093
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/65044abd5dc9ed00087e0f0a
😎 Deploy Preview https://deploy-preview-6291--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 14, 2023

Passing run #1263 ↗︎

0 74 0 0 Flakiness 0

Details:

Add Cypress test to Assets Export Functionality
Project: CARE Commit: 948e093e22
Status: Passed Duration: 02:41 💡
Started: Sep 15, 2023 12:18 PM Ended: Sep 15, 2023 12:21 PM

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

@khavinshankar khavinshankar merged commit 6b8f706 into develop Sep 15, 2023
36 of 37 checks passed
@khavinshankar khavinshankar deleted the cypress-asset-filter branch September 15, 2023 12:26
@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.

Create a new test to export an asset from the asset tab and asset detail page
2 participants