Feat v0.7.5 e2e ci gate #59
@@ -97,12 +97,11 @@ async function discoverSurfaces(page) {
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const context = await browser.newContext();
|
||||
|
||||
// Set auth cookie
|
||||
// Set auth cookie — use url instead of domain for reliable matching
|
||||
await context.addCookies([{
|
||||
name: 'arm_token',
|
||||
value: TOKEN,
|
||||
domain: new URL(SERVER).hostname,
|
||||
path: '/',
|
||||
url: SERVER,
|
||||
}]);
|
||||
|
||||
const page = await context.newPage();
|
||||
@@ -145,10 +144,11 @@ async function discoverSurfaces(page) {
|
||||
process.stdout.write(` ${surface.id} (${surface.route}) ... `);
|
||||
await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 });
|
||||
|
||||
// Assert 1: Shell topbar exists
|
||||
const topbar = await page.$('.sw-topbar');
|
||||
// Assert 1: Shell topbar renders (Preact SPA — wait for it to mount)
|
||||
const topbar = await page.waitForSelector('.sw-topbar', { timeout: 15000 })
|
||||
.catch(() => null);
|
||||
if (!topbar) {
|
||||
throw new Error('Shell topbar (.sw-topbar) not found');
|
||||
throw new Error('Shell topbar (.sw-topbar) not found after 15s');
|
||||
}
|
||||
|
||||
// Assert 2: Home link exists (favicon link or any link to /)
|
||||
|
||||
@@ -33,12 +33,12 @@ if (!TOKEN) {
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const context = await browser.newContext();
|
||||
|
||||
// Set auth cookie — name must match server's SetCookie ("arm_token")
|
||||
// Set auth cookie — use url instead of domain for reliable matching
|
||||
// in Docker/CI where hostname is a Docker DNS name (e.g. "armature")
|
||||
await context.addCookies([{
|
||||
name: 'arm_token',
|
||||
value: TOKEN,
|
||||
domain: new URL(SERVER).hostname,
|
||||
path: '/',
|
||||
url: SERVER,
|
||||
}]);
|
||||
|
||||
const page = await context.newPage();
|
||||
|
||||
Reference in New Issue
Block a user