MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / openPage

Function openPage

graph-ui/tools/pr-2068-feedback-e2e.mjs:68–79  ·  view source on GitHub ↗
(context, project)

Source from the content-addressed store, hash-verified

66}
67
68async function openPage(context, project) {
69 const page = await context.newPage();
70 pages.push(page);
71 page.on('pageerror', error => report.pageErrors.push({ project, message: error.message }));
72 page.on('console', event => { if (event.type() === 'error') report.consoleErrors.push({ project, text: event.text() }); });
73 page.on('requestfailed', request => report.failedRequests.push({ project, url: request.url(), failure: request.failure()?.errorText }));
74 await page.goto(`${ORIGIN}/?project=${encodeURIComponent(project)}&audit=${session}`, { waitUntil: 'domcontentloaded' });
75 const alerts = await loadedAlerts(page, project);
76 assert.equal(await alerts.locator('.daemon-alert-error').count(), 0, 'Initial historical errors must not become fresh alarms');
77 assert.ok((await alerts.innerText()).includes('Earlier events are in history'));
78 return { page, alerts };
79}
80
81async function refreshAlerts(page, alerts, project) {
82 await page.bringToFront();

Callers 1

mainFunction · 0.85

Calls 4

loadedAlertsFunction · 0.85
countMethod · 0.80
pushMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected