(page, label, shots)
| 803 | /** What the Galaxy draws: its headline names the indexed node count, which differs per project, while the stage text has no paths. */ |
| 804 | const galaxyGraph = (page) => page.evaluate(() => ({ headline: globalThis.__atlasGalaxy?.headline ?? '', nodes: globalThis.__atlasGalaxy?.nodes ?? 0, target: globalThis.__atlasGalaxy?.lastTargetQn ?? '' })); |
| 805 | async function viewTexts(page, label, shots) { |
| 806 | const texts = {}; |
| 807 | let galaxy; |
| 808 | for (const item of K24_VIEWS) { |
| 809 | await showView(page, item); |
| 810 | texts[item.id] = await settledStage(page, item.workspace === 'galaxy' ? 45000 : 30000); |
| 811 | if (item.workspace === 'galaxy') { await galaxyReady(page); galaxy = await galaxyGraph(page); } |
| 812 | if (item.workspace === 'system') texts[item.id] += `\n${await page.locator('select option[value="project"]').first().innerText().catch(() => '')}`; |
| 813 | if (shots) await shot(page, 'K24', `${label}-${item.id}`, `${label}: ${item.id} after the switch.`); |
| 814 | } |
| 815 | return { texts, galaxy }; |
| 816 | } |
| 817 | /** The same graph as the fresh Galaxy of the project: headline, node count and no selection carried over. */ |
| 818 | const sameGraph = (seen, fresh) => Boolean(seen && fresh) && seen.headline === fresh.headline && seen.nodes === fresh.nodes && seen.target === fresh.target; |
| 819 | /** Requests sent once the address named `shown` that name `project` (URL parameter or JSON argument); |
no test coverage detected