test: add component view tests and skip duplicated smoke E2E#28911
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
- Add CV tests for send, alert system, EIP-7702 relay, DeFi position details, market insights - Extend Engine mocks (AiDigest, Ramps), market insights renderer and presets - Annotate smoke specs with CV test filenames; skip E2E where CV replaces coverage - Silence jest/no-disabled-tests for intentional smoke skips Made-with: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
| }); | ||
| expect(getByText('Signing in with')).toBeDefined(); | ||
| expect(getByText('0x935E7...05477')).toBeDefined(); | ||
| expect(getByText('0x8Eeee...73D12')).toBeDefined(); |
There was a problem hiding this comment.
no, it was an AI decision to make the test consistent with a change done in the fixture to make it consistent with the siwe message payload. If you want, I can revert it, but now it uses the right address
There was a problem hiding this comment.
I'll leave it as it is now (with the AI change)
cryptotavares
left a comment
There was a problem hiding this comment.
The cv tests look good, however there are couple of e2e tests that should not be skipped.
Also why keeping the e2e tests as skipped? In my opinion we should just delete them (the ones that we have agreed that they could be moved to cv tests).
9d74f1b
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes are primarily test infrastructure (CV test additions, E2E test removals/skips), with minor app code changes to test IDs and fixtures. The remaining E2E tests in SmokeConfirmations and SmokeNetworkAbstractions need to be validated to ensure they still work correctly after the refactoring. Performance Test Selection: |
|



Description
This PR adds component view tests (CVT) for flows that were previously covered by smoke E2E only, and skips those E2E cases (eventually delete them). Smoke specs keep the original test bodies and point to the CV file with
// Moved to cv tests (...).Example: In network abstraction shard 1 we see a 4m reduction time (android).
E2E → component view test mapping
app/components/UI/DeFiPositions/DeFiProtocolPositionDetails.view.test.tsxapp/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.view.test.tsxapp/components/UI/TokenDetails/components/AssetOverviewContent.view.test.tsxapp/components/UI/TokenDetails/components/AssetOverviewContent.view.test.tsxapp/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.view.test.tsxapp/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.view.test.tsxapp/components/Views/confirmations/components/send/send.non-evm.view.test.tsxapp/components/Views/confirmations/components/send/send.non-evm.view.test.tsxapp/components/Views/confirmations/components/send/send.view.test.tsxapp/components/Views/confirmations/components/send/send.view.test.tsxapp/components/Views/confirmations/components/send/send.view.test.tsxapp/components/Views/confirmations/components/send/send.non-evm.view.test.tsxapp/components/Views/confirmations/components/alert-banner/alert-system-typed-sign-blockaid.view.test.tsxapp/components/Views/confirmations/components/alert-banner/alert-system-typed-sign-blockaid.view.test.tsxapp/components/Views/confirmations/components/alert-banner/alert-system-security-failed.view.test.tsxapp/components/Views/confirmations/components/alert-banner/alert-system-siwe-inline-mismatch.view.test.tsxapp/components/Views/confirmations/components/activity/eip-7702-sponsored-relay-api-failure.view.test.tsxapp/components/Views/Notifications/NotificationsView.view.test.tsxapp/components/Views/Settings/NotificationsSettings/NotificationsSettings.view.test.tsx*.view.test.tsxon this branchChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low product risk since changes are test-only, but moderate test-suite risk due to new integration-style view tests, new engine/nock mocks, and
jest.config.view.jsforcingIS_TEST=truefor feature-gated code paths.Overview
Adds component-view (CV) test coverage for several flows previously validated only by smoke E2E: DeFi protocol position details, token Market Insights (including entry card gating + swap/buy navigation + sources sheet + feedback), notifications list/details and notification settings toggles, confirmation alert-system (typed-sign Blockaid benign/malicious + SIWE domain mismatch inline + validation-failed banner), and EIP-7702 sponsored send (failed activity status + “Paid by MetaMask” fee row).
Extends CV test infrastructure with new presets/helpers and mocks (notifications state seeding, Market Insights navigation renderer/preset, SnapController request interceptor, Sentinel
/networksnock mock), adds/normalizes severaltestIdconstants (send 50% button, confirmation transfer loader, status-icon tooltip), and setsprocess.env.IS_TEST=trueat view-jest config load time to satisfy env-inlined feature gates.Removes or skips corresponding smoke E2E specs (or individual cases) and updates fixtures/assertions (e.g., SIWE signer address) to align with the new CV coverage.
Reviewed by Cursor Bugbot for commit 6098045. Bugbot is set up for automated code reviews on this repo. Configure here.