Skip to content

Commit b151b6f

Browse files
authored
chore: remove dead routes and add non screen marker to the routes <=> POM registry (#47742)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The route page object registry mapped 89 routes to `null`. An audit of those routes found two problems. 1. Some routes are dead. No UI code navigates to them or renders them, because the screens behind them were removed long ago: - `/networks/form`, `/networks/add-network`, `/networks/add-popular-custom-network` (legacy network settings, removed in #41945 and #42255) - `/import-token`, `/import-tokens`, `/confirm-import-token` (token import moved to a modal in #19553) - `/remote`, `/remote/setup-swaps`, `/remote/setup-daily-allowance` (remote mode removed in #34041) - `/initialize/experimental-area` (old onboarding flow removed in #17081) - `/onboarding/help-us-improve` (no references) 2. Some routes never render a screen of their own, but the registry showed them as "no page object yet", the same as screens that are missing tests: - `/lock` runs the lock action. - `/settings-v2` and `/musd` only redirect. - `/new-account` and `/onboarding` only host nested routes. - `/perps` has no router entry. This PR: - Removes the 11 dead routes: their constants, their `ROUTES` entries, their registry entries, and the leftover mm-cli references in `extension-launcher.ts` and `state-inspector.ts`. - Adds a `NOT_A_SCREEN` marker to the route registry and uses it for the 6 routes above. The coverage report shows these routes with a `not-a-screen` status and a "Not a screen" count, and leaves them out of the coverage percentage. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <img width="740" height="233" alt="image" src="https://github.com/user-attachments/assets/4e5244d5-33f6-46c1-896d-212a5f0580ea" /> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test tooling and route constant cleanup only; no production UI or auth paths changed beyond deleting unused route definitions. > > **Overview** > Introduces a **`NOT_A_SCREEN`** marker in the E2E route ↔ page-object registry for paths that redirect, run an action, or only host nested routes (e.g. `/lock`, `/onboarding`, `/settings-v2`). The route coverage report and **`getRouteCoverage`** now surface a `not-a-screen` status, count them separately, and **exclude them from the coverage percentage** so missing POMs are not conflated with non-screens. > > **Removes 11 dead routes** from `ui/helpers/constants/routes.ts` (`ROUTES` and exported constants): legacy network form routes, old token import/confirm paths, remote mode routes, `initialize/experimental-area`, and `onboarding/help-us-improve`. Registry entries and related references in Playwright **extension-launcher** and **state-inspector** are aligned (e.g. drop `CONFIRM_IMPORT_TOKEN`, map metametrics only via `ONBOARDING_METAMETRICS`). > > Docs (**`AGENTS.md`**) and tests for registry/coverage are updated to describe and enforce the new marker. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f9c408f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 1809248 commit b151b6f

11 files changed

Lines changed: 75 additions & 119 deletions

File tree

‎test/e2e/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ Write E2E correctly from the start using `mms-extension-testing`. Before submitt
4040
| Page object importing/calling another page object | Flow that owns both page objects |
4141
| `try` / `catch` in page objects or flows | Let failures surface via waits / `check*` messages |
4242

43-
**Route registry:** when you add a page object for a full screen that has its own route, map it in [route-registry/route-registry.ts](./route-registry/route-registry.ts), replacing `null`. Skip this for page objects that cover modals or components. It is optional and never blocks a PR; only adding or removing routes is enforced, by `route-registry.test.ts`.
43+
**Route registry:** when you add a page object for a full screen that has its own route, map it in [route-registry/route-registry.ts](./route-registry/route-registry.ts), replacing `null`. Skip this for page objects that cover modals or components. Use `NOT_A_SCREEN` for routes that only redirect, run an action or host nested routes, so they are left out of the coverage percentage. It is optional and never blocks a PR; only adding or removing routes is enforced, by `route-registry.test.ts`.
4444

4545
Run `yarn skills` after `yarn install` if `.cursor/rules/mms-extension-testing/` is missing locally.

‎test/e2e/playwright/llm-workflow/extension-launcher.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
CONNECT_ROUTE,
1212
CONFIRM_TRANSACTION_ROUTE,
1313
CONFIRMATION_V_NEXT_ROUTE,
14-
CONFIRM_IMPORT_TOKEN_ROUTE,
1514
CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE,
1615
CONFIRM_ADD_SUGGESTED_NFT_ROUTE,
1716
} from '../../../../ui/helpers/constants/routes';
@@ -42,7 +41,6 @@ const SIDEPANEL_CONFIRMATION_ROUTE_PREFIXES: string[] = [
4241
CONNECT_ROUTE,
4342
CONFIRM_TRANSACTION_ROUTE,
4443
CONFIRMATION_V_NEXT_ROUTE,
45-
CONFIRM_IMPORT_TOKEN_ROUTE,
4644
CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE,
4745
CONFIRM_ADD_SUGGESTED_NFT_ROUTE,
4846
];

‎test/e2e/playwright/llm-workflow/launcher/state-inspector.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,6 @@ describe('state-inspector', () => {
234234
'chrome-extension://id/home.html#/onboarding/completion',
235235
),
236236
).toBe('onboarding-complete');
237-
expect(
238-
detectScreenFromUrl(
239-
'chrome-extension://id/home.html#/onboarding/help-us-improve',
240-
),
241-
).toBe('onboarding-metametrics');
242237
expect(
243238
detectScreenFromUrl(
244239
`chrome-extension://id/home.html#${ONBOARDING_METAMETRICS}`,

‎test/e2e/playwright/llm-workflow/launcher/state-inspector.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
ONBOARDING_COMPLETION_ROUTE,
99
ONBOARDING_CONFIRM_SRP_ROUTE,
1010
ONBOARDING_CREATE_PASSWORD_ROUTE,
11-
ONBOARDING_HELP_US_IMPROVE_ROUTE,
1211
ONBOARDING_IMPORT_WITH_SRP_ROUTE,
1312
ONBOARDING_METAMETRICS,
1413
ONBOARDING_PRIVACY_SETTINGS_ROUTE,
@@ -269,9 +268,7 @@ export function detectScreenFromUrl(
269268
screen: 'onboarding-complete',
270269
},
271270
{
272-
matcher: (path) =>
273-
hasRoutePrefix(path, ONBOARDING_METAMETRICS) ||
274-
hasRoutePrefix(path, ONBOARDING_HELP_US_IMPROVE_ROUTE),
271+
matcher: (path) => hasRoutePrefix(path, ONBOARDING_METAMETRICS),
275272
screen: 'onboarding-metametrics',
276273
},
277274
{

‎test/e2e/route-registry/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { ROUTE_PAGE_OBJECT_REGISTRY } from './route-registry';
1+
export { NOT_A_SCREEN, ROUTE_PAGE_OBJECT_REGISTRY } from './route-registry';
22
export type {
33
PageObjectClass,
44
RoutePageObjectRegistry,

‎test/e2e/route-registry/route-coverage.test.ts‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getRouteCoverage } from './route-coverage';
2-
import type { RoutePageObjectRegistry } from './route-registry';
2+
import { NOT_A_SCREEN, type RoutePageObjectRegistry } from './route-registry';
33

44
class HomePage {}
55

@@ -10,17 +10,19 @@ const ROUTES = [
1010
{ path: '/send', label: 'Send Page' },
1111
{ path: '/activity', label: 'Activity' },
1212
{ path: '/lock', label: 'Lock Page' },
13+
{ path: '/unlock', label: 'Unlock Page' },
1314
];
1415

1516
describe('getRouteCoverage', () => {
1617
const registry: RoutePageObjectRegistry = {
1718
'/': HomePage,
1819
'/send': SendPage,
1920
'/activity': null,
21+
'/lock': NOT_A_SCREEN,
2022
'/removed-route': HomePage,
2123
};
2224

23-
it('reports each route with its page object, none yet, or unregistered', () => {
25+
it('reports each route with its page object, none yet, not a screen, or unregistered', () => {
2426
const { routes } = getRouteCoverage(ROUTES, registry);
2527

2628
expect(routes).toStrictEqual([
@@ -37,7 +39,8 @@ describe('getRouteCoverage', () => {
3739
pageObject: 'SendPage',
3840
},
3941
{ path: '/activity', label: 'Activity', status: 'no-page-object' },
40-
{ path: '/lock', label: 'Lock Page', status: 'unregistered' },
42+
{ path: '/lock', label: 'Lock Page', status: 'not-a-screen' },
43+
{ path: '/unlock', label: 'Unlock Page', status: 'unregistered' },
4144
]);
4245
});
4346

@@ -47,13 +50,14 @@ describe('getRouteCoverage', () => {
4750
expect(staleEntries).toStrictEqual(['/removed-route']);
4851
});
4952

50-
it('summarizes the counts and the share of routes with a page object', () => {
53+
it('summarizes the counts and the share of screen routes with a page object', () => {
5154
const { summary } = getRouteCoverage(ROUTES, registry);
5255

5356
expect(summary).toStrictEqual({
54-
totalRoutes: 4,
57+
totalRoutes: 5,
5558
withPageObject: 2,
5659
withoutPageObject: 1,
60+
notAScreen: 1,
5761
unregistered: 1,
5862
staleEntries: 1,
5963
coveragePercentage: 50,
@@ -65,4 +69,12 @@ describe('getRouteCoverage', () => {
6569

6670
expect(summary.coveragePercentage).toBe(0);
6771
});
72+
73+
it('reports 0% coverage when no route is a screen', () => {
74+
const { summary } = getRouteCoverage([{ path: '/lock', label: 'Lock' }], {
75+
'/lock': NOT_A_SCREEN,
76+
});
77+
78+
expect(summary.coveragePercentage).toBe(0);
79+
});
6880
});

‎test/e2e/route-registry/route-coverage.ts‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import type { RoutePageObjectRegistry } from './route-registry';
1+
import { NOT_A_SCREEN, type RoutePageObjectRegistry } from './route-registry';
22

33
export type RouteCoverageStatus =
44
| 'page-object'
55
| 'no-page-object'
6+
| 'not-a-screen'
67
| 'unregistered';
78

89
export type RouteCoverageEntry = {
@@ -19,8 +20,10 @@ export type RouteCoverageReport = {
1920
totalRoutes: number;
2021
withPageObject: number;
2122
withoutPageObject: number;
23+
notAScreen: number;
2224
unregistered: number;
2325
staleEntries: number;
26+
/** Share of routes that have a page object, not counting non-screens. */
2427
coveragePercentage: number;
2528
};
2629
routes: RouteCoverageEntry[];
@@ -32,7 +35,7 @@ export type RouteCoverageReport = {
3235
* Compares the routes with the page object registry.
3336
*
3437
* @param routes - The routes to cover, normally `ROUTES`.
35-
* @param registry - Route path → page object (or `null`).
38+
* @param registry - Route path → page object, `NOT_A_SCREEN` or `null`.
3639
* @returns Per-route status, stale registry entries and a summary.
3740
*/
3841
export function getRouteCoverage(
@@ -44,6 +47,9 @@ export function getRouteCoverage(
4447
return { path, label, status: 'unregistered' };
4548
}
4649
const pageObject = registry[path];
50+
if (pageObject === NOT_A_SCREEN) {
51+
return { path, label, status: 'not-a-screen' };
52+
}
4753
return pageObject
4854
? { path, label, status: 'page-object', pageObject: pageObject.name }
4955
: { path, label, status: 'no-page-object' };
@@ -56,18 +62,21 @@ export function getRouteCoverage(
5662
const count = (status: RouteCoverageStatus) =>
5763
entries.filter((entry) => entry.status === status).length;
5864
const withPageObject = count('page-object');
65+
const notAScreen = count('not-a-screen');
66+
const screenRoutes = entries.length - notAScreen;
5967

6068
return {
6169
generatedAt: new Date().toISOString(),
6270
summary: {
6371
totalRoutes: entries.length,
6472
withPageObject,
6573
withoutPageObject: count('no-page-object'),
74+
notAScreen,
6675
unregistered: count('unregistered'),
6776
staleEntries: staleEntries.length,
6877
coveragePercentage:
69-
entries.length > 0
70-
? Math.round((withPageObject / entries.length) * 100)
78+
screenRoutes > 0
79+
? Math.round((withPageObject / screenRoutes) * 100)
7180
: 0,
7281
},
7382
routes: entries,

‎test/e2e/route-registry/route-registry.test.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { ROUTES } from '../../../ui/helpers/constants/routes';
22
import { getRouteCoverage } from './route-coverage';
3-
import { ROUTE_PAGE_OBJECT_REGISTRY } from './route-registry';
3+
import { NOT_A_SCREEN, ROUTE_PAGE_OBJECT_REGISTRY } from './route-registry';
44

55
describe('ROUTE_PAGE_OBJECT_REGISTRY', () => {
6-
it('maps every path to a page object class or null', () => {
6+
it('maps every path to a page object class, NOT_A_SCREEN or null', () => {
77
for (const [path, pageObject] of Object.entries(
88
ROUTE_PAGE_OBJECT_REGISTRY,
99
)) {
10-
expect([path, pageObject === null || typeof pageObject]).toStrictEqual([
10+
const isMarker = pageObject === null || pageObject === NOT_A_SCREEN;
11+
expect([path, isMarker || typeof pageObject]).toStrictEqual([
1112
path,
12-
pageObject === null ? true : 'function',
13+
isMarker ? true : 'function',
1314
]);
1415
}
1516
});
@@ -21,7 +22,7 @@ describe('ROUTE_PAGE_OBJECT_REGISTRY', () => {
2122
});
2223

2324
// Add any path listed here to route-registry.ts, using `null` when the
24-
// route has no page object yet.
25+
// route has no page object yet or `NOT_A_SCREEN` when it renders no screen.
2526
it('lists every route in ROUTES', () => {
2627
const unregistered = getRouteCoverage(ROUTES, ROUTE_PAGE_OBJECT_REGISTRY)
2728
.routes.filter((route) => route.status === 'unregistered')

‎test/e2e/route-registry/route-registry.ts‎

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@
22
* Route Page Object Registry
33
*
44
* Maps each route in `ROUTES` (ui/helpers/constants/routes.ts) to the E2E
5-
* page object for the screen it renders, or to `null` when there is no page
6-
* object for it yet. The route coverage report
5+
* page object for the screen it renders, to `null` when there is no page
6+
* object for it yet, or to `NOT_A_SCREEN` when the route never renders a
7+
* screen of its own (it redirects, runs an action, or only hosts nested
8+
* routes). The route coverage report
79
* (test/e2e/scripts/route-coverage-report.ts) compares this registry with
810
* `ROUTES` and lists routes with a page object, routes without one, routes
9-
* missing from the registry and registry entries for routes that no longer
10-
* exist.
11+
* that are not screens, routes missing from the registry and registry entries
12+
* for routes that no longer exist.
1113
*
1214
* Keys are route path patterns exactly as they appear in `ROUTES`. They are
1315
* plain strings on purpose so renaming or removing a route never breaks the
1416
* build; route-registry.test.ts fails instead and lists the paths to fix.
1517
*
1618
* When you add, rename or remove a route, update this registry too: use its
17-
* page object if there is one, otherwise `null`.
19+
* page object if there is one, `NOT_A_SCREEN` if it renders no screen of its
20+
* own, otherwise `null`.
1821
*/
1922

2023
import AccountAddressListPage from '../page-objects/pages/accounts/address-list-page';
@@ -86,8 +89,20 @@ import type { Driver } from '../webdriver/driver';
8689
/** An E2E page object class, constructed with the driver. */
8790
export type PageObjectClass = new (driver: Driver) => object;
8891

89-
/** Route path pattern → its page object, or `null` when there is none yet. */
90-
export type RoutePageObjectRegistry = Record<string, PageObjectClass | null>;
92+
/**
93+
* Marks a route that never renders a screen of its own, so it needs no page
94+
* object: it redirects, runs an action, or only hosts nested routes.
95+
*/
96+
export const NOT_A_SCREEN = 'not-a-screen';
97+
98+
/**
99+
* Route path pattern → its page object, `NOT_A_SCREEN`, or `null` when there
100+
* is no page object yet.
101+
*/
102+
export type RoutePageObjectRegistry = Record<
103+
string,
104+
PageObjectClass | typeof NOT_A_SCREEN | null
105+
>;
91106

92107
export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
93108
// Home and wallet
@@ -96,7 +111,7 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
96111
'/activity': ActivityTab,
97112
'/tx/:caipChainId/:txIdentifier': TransactionDetailsPage,
98113
'/unlock': LoginPage,
99-
'/lock': null,
114+
'/lock': NOT_A_SCREEN,
100115
'/rewards': null,
101116
'/link': DeepLink,
102117
'/basic-functionality-off': BasicFunctionalityOffPage,
@@ -107,19 +122,18 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
107122
'/discover-search': null,
108123
'/hardware-wallet-repair': null,
109124
'/shield-plan': ShieldPlanPage,
110-
'/initialize/experimental-area': null,
111125

112126
// Money
113127
'/money-home': MoneyHomePage,
114128
'/money-home/how-it-works': null,
115129
'/money-home/activity/:transactionId': MoneyTransactionDetailsPage,
116130
'/money-home/earn': null,
117-
'/musd': null,
131+
'/musd': NOT_A_SCREEN,
118132
'/musd/education': null,
119133

120134
// Perps
121135
'/perps-home': PerpsTab,
122-
'/perps': null,
136+
'/perps': NOT_A_SCREEN,
123137
'/perps/market-list': PerpsMarketListPage,
124138
'/perps/market/:symbol': PerpsMarketDetailPage,
125139
'/perps/trade/:symbol': PerpsOrderEntryPage,
@@ -136,7 +150,7 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
136150
'/multichain-smart-account/:address': null,
137151
'/multichain-account-address-list': AccountAddressListPage,
138152
'/multichain-account-private-key-list': PrivateKeyModal,
139-
'/new-account': null,
153+
'/new-account': NOT_A_SCREEN,
140154
'/new-account/connect': ConnectHardwareWalletPage,
141155
'/sync-accounts': SyncAccountsSettingsPage,
142156
'/mfa': null,
@@ -146,9 +160,6 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
146160
'/asset/:chainId/:asset?/:id?': AssetDetailsPage,
147161
'/asset/:chainId/:asset?/:id?/security-trust': null,
148162
'/defi': DeFiDetailsPage,
149-
'/import-token': null,
150-
'/import-tokens': null,
151-
'/confirm-import-token': null,
152163
'/token-management': TokenManagementPage,
153164
'/custom-token-import': CustomTokenImportPage,
154165
'/import-nfts': ImportNftPage,
@@ -169,9 +180,6 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
169180
'/cross-chain/swaps/prepare-bridge-page/assets': null,
170181
'/swaps/awaiting-signatures': null,
171182
'/swaps/hardware-wallet-signatures': HardwareWalletSignaturesPage,
172-
'/remote': null,
173-
'/remote/setup-swaps': null,
174-
'/remote/setup-daily-allowance': null,
175183

176184
// Confirmations
177185
'/confirm-transaction': Confirmation,
@@ -207,17 +215,14 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
207215

208216
// Networks and contacts
209217
'/networks': NetworksPage,
210-
'/networks/form': null,
211-
'/networks/add-network': null,
212-
'/networks/add-popular-custom-network': null,
213218
'/contacts': ContactsSettings,
214219
'/contacts/add': null,
215220
'/contacts/view/:chainId/:address': null,
216221
'/contacts/edit/:chainId/:address': null,
217222

218223
// Settings
219224
'/settings': SettingsPage,
220-
'/settings-v2': null,
225+
'/settings-v2': NOT_A_SCREEN,
221226
'/settings/about-us': AboutPage,
222227
'/settings/assets': null,
223228
'/settings/backup-and-sync': BackupAndSyncSettings,
@@ -258,7 +263,7 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
258263
'/settings/transaction-shield/claims/view-history-claim': null,
259264

260265
// Onboarding
261-
'/onboarding': null,
266+
'/onboarding': NOT_A_SCREEN,
262267
'/onboarding/welcome': StartOnboardingPage,
263268
'/onboarding/create-password': OnboardingPasswordPage,
264269
'/onboarding/review-recovery-phrase': SecureWalletPage,
@@ -268,7 +273,6 @@ export const ROUTE_PAGE_OBJECT_REGISTRY: RoutePageObjectRegistry = {
268273
'/onboarding/unlock': LoginPage,
269274
'/onboarding/privacy-settings': OnboardingPrivacySettingsPage,
270275
'/onboarding/completion': OnboardingCompletePage,
271-
'/onboarding/help-us-improve': null,
272276
'/onboarding/metametrics': OnboardingMetricsPage,
273277
'/onboarding/account-exist': null,
274278
'/onboarding/account-not-found': null,

‎test/e2e/scripts/route-coverage-report.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*
44
* Compares the extension routes (`ROUTES` in ui/helpers/constants/routes.ts)
55
* with the route page object registry (test/e2e/route-registry) and reports
6-
* which routes have an E2E page object, which have none yet, which are
7-
* missing from the registry, and which registry entries no longer match a
8-
* route.
6+
* which routes have an E2E page object, which have none yet, which are not
7+
* screens, which are missing from the registry, and which registry entries no
8+
* longer match a route.
99
*
1010
* Usage:
1111
* yarn test:e2e:route-coverage
@@ -43,9 +43,13 @@ function printReport(report: RouteCoverageReport): void {
4343
['Total routes', summary.totalRoutes],
4444
['With a page object', summary.withPageObject],
4545
['No page object yet', summary.withoutPageObject],
46+
['Not a screen', summary.notAScreen],
4647
['Not in the registry', summary.unregistered],
4748
['Stale registry entries', summary.staleEntries],
48-
['Coverage', `${summary.coveragePercentage}% of routes have a page object`],
49+
[
50+
'Coverage',
51+
`${summary.coveragePercentage}% of screen routes have a page object`,
52+
],
4953
];
5054
for (const [label, value] of summaryRows) {
5155
console.log(` ${`${label}:`.padEnd(25)}${value}`);

0 commit comments

Comments
 (0)