-
Notifications
You must be signed in to change notification settings - Fork 36
test(37074) Optimisation of Visual Regressions tests in Percy #1236
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
Conversation
Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes Percy visual regression testing by removing 90+ component-level snapshots and consolidating to 20 strategic E2E page snapshots, reducing token usage while improving coverage. The changes eliminate redundant component tests and add comprehensive E2E visual regression tests across all major application modules, including new coverage for Data Hub, Pulse, and Mappings features.
Key changes:
- Removed all Percy snapshots from Cypress component tests (70+ files)
- Added 20 strategic Percy snapshots in E2E tests covering critical user journeys
- Integrated
@cypress/grepplugin for selective test execution with@percytags - Added new test utilities and mock data for improved E2E test coverage
Reviewed Changes
Copilot reviewed 127 out of 129 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Added @cypress/grep dependency and updated @4tw/cypress-drag-drop version |
tsconfig.json, tsconfig.app.json |
Added @cypress/grep types for TypeScript support |
cypress.config.ts |
Integrated @cypress/grep plugin for both E2E and component testing |
cypress/support/*.ts |
Registered @cypress/grep plugin and updated log collector configuration |
| Component test files (70+ files) | Removed cy.percySnapshot() calls from component tests |
| E2E test files | Added strategic Percy snapshots with @percy tags for Login, Adapters, Bridges, Workspace, DataHub, Pulse, and Mappings |
cypress/pages/* |
Enhanced page objects with new getters for error states and UI elements |
cypress/support/tags.ts |
Added centralized tag constants for Cypress grep |
cypress/utils/intercept.utils.ts |
Enhanced interceptor utilities with additional API mocks |
src/__test-utils__/adapters/* |
Added new mock adapters (MTConnect, Databases, BACnet/IP) and consolidated exports |
.tasks/* |
Added comprehensive task documentation for Percy optimization work |
Files not reviewed (1)
- hivemq-edge-frontend/pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
hivemq-edge-frontend/src/extensions/datahub/designer/operation/OperationNode.spec.cy.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🦣
4a594c5 to
cf87774
Compare
cf87774 to
db9bc83
Compare
See https://hivemq.kanbanize.com/ctrl_board/57/cards/37074/details/
The PR optimises the usage of Percy visual regressions tests in the Edge frontend, as we have a limited number of runs available avery months (and used to significantly exceed that limit)
The PR removes EVERY test that were originial created on the Cypress Component test suites. Instead, it organised the Percy snpashots on selected (possibly critical) paths in the Cypress E2E test suites.
The outcomes of this first refactoring tasks is a focus on 20 snapshots of whole "pages" at different points of interaction, compared to 90 snapshots of components in isolation
Before
After