Skip to content

Commit d157699

Browse files
authored
refactor(ui): split the network page into section components (#495)
Fixes #369
1 parent 4576a19 commit d157699

20 files changed

Lines changed: 6864 additions & 3734 deletions

‎app/src/__tests__/page-conventions.test.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ async function pageSources(): Promise<Map<string, string>> {
1111
const fsName = 'node:fs';
1212
const fs = (await import(/* @vite-ignore */ fsName)) as {
1313
readFileSync(path: string, encoding: 'utf8'): string;
14-
readdirSync(path: string): string[];
14+
readdirSync(path: string, options: { recursive: true }): string[];
1515
};
16-
const files = fs.readdirSync(PAGES).filter((file) => file.endsWith('.ts'));
16+
// Recursive, so a page split into a folder (pages/network/) is still checked.
17+
const files = fs
18+
.readdirSync(PAGES, { recursive: true })
19+
.map((file) => file.replaceAll('\\', '/'))
20+
.filter((file) => file.endsWith('.ts'));
1721
return new Map(files.map((file) => [file, fs.readFileSync(`${PAGES}${file}`, 'utf8')]));
1822
}
1923

@@ -125,7 +129,8 @@ describe('pages with a keyboard list use the shared roving list', () => {
125129
const lists = {
126130
'capacitor-inspector.ts': '[data-cap-call]',
127131
'pipes-inspector.ts': '[data-pipe-row]',
128-
'network-inspector.ts': '',
132+
'network/call-timeline.ts': '',
133+
'network/ssr-requests.ts': '',
129134
'query-inspector.ts': '',
130135
'signal-inspector.ts': '',
131136
'store-inspector.ts': '',

0 commit comments

Comments
 (0)