Skip to content

Conversation

@vanch3d
Copy link
Contributor

@vanch3d vanch3d commented Oct 22, 2025

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

@vanch3d vanch3d self-assigned this Oct 22, 2025
@cla-bot cla-bot bot added the cla-signed label Oct 22, 2025
@github-actions
Copy link

github-actions bot commented Oct 22, 2025

Test Results

  461 files  ±0    461 suites  ±0   4m 0s ⏱️ ±0s
3 883 tests ±0  3 880 ✅ ±0  3 💤 ±0  0 ❌ ±0 
3 890 runs  ±0  3 887 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit cf87774. ± Comparison against base commit ccd6ef5.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

Coverage Report

Overall Project 65.14%

There is no coverage information present for the Files changed

@vanch3d vanch3d requested a review from Copilot October 22, 2025 16:00
Copy link
Contributor

Copilot AI left a 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/grep plugin for selective test execution with @percy tags
  • 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.

Copy link
Contributor

@oli-hivemq oli-hivemq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦣

@vanch3d vanch3d marked this pull request as ready for review October 23, 2025 11:57
@vanch3d vanch3d force-pushed the test/37074-percy-simplification branch from 4a594c5 to cf87774 Compare October 23, 2025 13:42
@vanch3d vanch3d force-pushed the test/37074-percy-simplification branch from cf87774 to db9bc83 Compare October 23, 2025 14:11
@vanch3d vanch3d merged commit f10519e into master Oct 23, 2025
13 of 16 checks passed
@vanch3d vanch3d deleted the test/37074-percy-simplification branch October 23, 2025 14:15
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