mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* tests: wait for skeletons to disappear before visual screenshots
Add verifySkeletonsGone() helper to main.page.js that waits until all
MUI Skeleton elements are gone. Call it at the end of every visual test
to ensure the page is fully rendered before Chromatic takes a screenshot.
Fixes flaky visual diffs caused by async components (e.g. WalletConnect
button, token lists) still loading when the screenshot is captured.
* tests: add full visual test coverage for Chromatic E2E
Add 15 new visual test files covering all testable user-facing pages:
- Dashboard, Balances, NFTs (mocked), Address book (localStorage)
- Transaction history (mocked), Messages (mocked), Batch TX modal
- Settings: data, security, cookies, Safe Apps permissions
- New safe: create, load, advanced create
- Custom Safe Apps page
- Owner management: add/replace signer (wallet)
- Spending limits form (wallet)
Pin commit hash to '0000000' in Chromatic E2E workflow for
deterministic footer screenshots. Make build action respect
pre-set NEXT_PUBLIC_COMMIT_HASH to avoid overwriting.
Total: 21 files, 36 screenshots (up from 6 files, 19 screenshots).
* tests: move visual tests to dedicated directory, scope Chromatic workflow
Move all visual regression tests from cypress/e2e/smoke/visual/ to
cypress/e2e/visual/ as a top-level test directory alongside smoke/
and regression/. Update import paths accordingly.
Update Chromatic E2E workflow to only run visual tests
(cypress/e2e/visual/**/*.cy.js) instead of all smoke tests,
reducing CI runtime and keeping visual regression focused.
* tests: add tx/msg detail & positions visual tests, use constants everywhere
- Add visual tests for tx details, message details, and DeFi positions pages
- Replace all hardcoded URLs, selectors, and strings with constants
- Add cy.wait(1000) after button clicks to let ripple effects settle
- Remove unused navigation import from owner_management
- Add positionsUrl, cookiesUrl, advancedCreateSafeSepoliaUrl, chainConfigEndpoint,
chainFeatures constants
* tests: add visual test coverage report
* tests: add visual tests for swap, bridge, stake, earn, error, legal, env pages
Complete visual test coverage for all testable pages (52 screenshots).
New tests use chain config intercept to enable feature flags for
swap (NATIVE_SWAPS), bridge (BRIDGE), stake (STAKING), earn (EARN).
* tests: add visual tests for spaces pages and user settings
Mock SIWE auth via localStorage and intercept spaces API endpoints
to enable visual regression testing of all 5 spaces pages and the
user settings page.
* tests: move spaces mock data to fixtures, fix hardcoded URL
- Move inlined mock payloads (user, space, members, address book) to
cypress/fixtures/spaces/ per cypress-e2e.mdc rules
- Add safeAppsSettingsUrl constant to avoid hardcoded ?safe= in test
- Use cy.fixture() in spaces.cy.js and user_settings.cy.js
* tests: extract enableChainFeature helper, DRY up visual tests
Extract the duplicated chain config intercept pattern (6 files) into
main.enableChainFeature() in main.page.js. Each visual test now calls
the shared helper instead of inlining the 9-line intercept block.
* tests: polish visual tests — extract shared setup to beforeEach, remove noise
* tests: fix screenshot count in COVERAGE.md (58, not 59)
* tests: auto-capture dark mode for every visual test via afterEach hook
Adds a global afterEach that toggles data-theme="dark" and calls
cy.takeSnapshot('dark') for all visual tests. Removes the now-redundant
dark_mode.cy.js — every test gets both light and dark Chromatic snapshots.
* tests: document visual test coverage gaps in COVERAGE.md
Cross-reference Storybook coverage (823 components) to identify
interactive states not captured by page-level screenshots.
* tests: add missing visual states from smoke tests
Add interactive states that smoke tests cover but visual tests missed:
- sidebar: multichain safes expanded with chain icons
- dashboard: pending transactions widget (mocked)
- balances: all tokens visible with dust filter off
- address book: edit entry empty name validation
- create tx: nonce warning tooltip
- owner management: invalid address error in add signer
- spending limits: amount validation error, reset time dropdown
- new safe: invalid address error on load form
- .prettierignore: exclude cypress/downloads (Chromatic archives)
64 tests across 33 files (128 Chromatic snapshots with dark mode)
* tests: replace raw cy.wait() with waitForMuiAnimationsToSettle() in visual tests
Extract a named utility for the 1s animation settle delay needed in visual
regression tests. MUI button ripple, modal slide-in, and accordion expand
animations cause flaky Chromatic diffs when captured mid-transition. Applied
consistently across all 10 visual test files that interact with MUI controls.
* docs: move Cypress docs to apps/web/cypress/, add CLAUDE.md for E2E conventions
- Move COVERAGE.md from e2e/visual/ to cypress/ (no longer buried between tests)
- Add cypress/CLAUDE.md with visual test patterns, animation settling, data setup
- Add cypress/AGENTS.md pointing to CLAUDE.md
- Trim root AGENTS.md E2E section to brief overview + link to cypress/CLAUDE.md
- Add maintenance hint to COVERAGE.md header
* chore: use boolean flag for visual regression commit hash instead of arbitrary override
Replace NEXT_PUBLIC_COMMIT_HASH override with VISUAL_REGRESSION_BUILD boolean.
Build action sets commit hash to "vistest" when flag is true, preventing
arbitrary values while keeping footer deterministic for Chromatic screenshots.
---------
Co-authored-by: Hanzo Dev <[email protected]>
33 lines
797 B
JSON
33 lines
797 B
JSON
{
|
|
"members": [
|
|
{
|
|
"id": 1,
|
|
"role": "ADMIN",
|
|
"name": "Admin User",
|
|
"status": "ACTIVE",
|
|
"createdAt": "2025-01-01T00:00:00.000Z",
|
|
"updatedAt": "2025-01-01T00:00:00.000Z",
|
|
"user": { "id": 1, "status": "ACTIVE" }
|
|
},
|
|
{
|
|
"id": 2,
|
|
"role": "MEMBER",
|
|
"name": "Team Member",
|
|
"status": "ACTIVE",
|
|
"createdAt": "2025-01-02T00:00:00.000Z",
|
|
"updatedAt": "2025-01-02T00:00:00.000Z",
|
|
"user": { "id": 2, "status": "ACTIVE" }
|
|
},
|
|
{
|
|
"id": 3,
|
|
"role": "MEMBER",
|
|
"name": "Invited User",
|
|
"status": "INVITED",
|
|
"invitedBy": "Admin User",
|
|
"createdAt": "2025-01-03T00:00:00.000Z",
|
|
"updatedAt": "2025-01-03T00:00:00.000Z",
|
|
"user": { "id": 3, "status": "PENDING" }
|
|
}
|
|
]
|
|
}
|