Stabilize Playwright phase 8 with page smokes and flake fixes.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Direct-navigate Calibrate, harden stub agent timing, and add Emberwake/Seer/Oath smokes so the full 32-spec E2E sweep passes reliably.
This commit is contained in:
@@ -15,14 +15,16 @@ export async function ensureLiveStubAgent(request: APIRequestContext): Promise<b
|
||||
if (disconnectStub) return serverReady;
|
||||
if (!connectPromise) {
|
||||
connectPromise = (async () => {
|
||||
try {
|
||||
serverReady = await waitForServerHealth(request);
|
||||
if (!serverReady) return false;
|
||||
|
||||
const fleetSecret = await fetchFleetSecret(request);
|
||||
disconnectStub = await connectStubAgent(e2eBaseURL(), fleetSecret);
|
||||
// Allow agent_online, stats_batch (250ms coalesce), and DB upsert to settle.
|
||||
await new Promise((r) => setTimeout(r, 2_500));
|
||||
await new Promise((r) => setTimeout(r, 4_000));
|
||||
return true;
|
||||
} catch { teardownLiveStubAgent(); return false; }
|
||||
})();
|
||||
}
|
||||
return connectPromise;
|
||||
|
||||
@@ -39,7 +39,7 @@ test.describe('LOTL Timeline E2E', () => {
|
||||
await expect(page.getByRole('heading', { name: 'LOTL Timeline' })).toBeVisible({
|
||||
timeout: 10_000,
|
||||
});
|
||||
await expect(page.getByText('FLEET ONION PROGRESS')).toBeVisible();
|
||||
await expect(page.getByText('FLEET ONION PROGRESS')).toBeVisible({ timeout: 15_000 });
|
||||
await expect(
|
||||
page.locator('.lotl-fleet-chip').filter({ hasText: E2E_STUB_AGENT_HOSTNAME }),
|
||||
).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
@@ -24,13 +24,13 @@ test.describe('Page smoke', () => {
|
||||
});
|
||||
|
||||
test('Settings renders Calibrate', async ({ page }) => {
|
||||
await page.getByRole('navigation').getByRole('link', { name: 'Calibrate', exact: true }).click();
|
||||
await page.goto('/settings');
|
||||
await expect(page.getByRole('heading', { name: 'Calibrate' })).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.getByRole('button', { name: 'Save Calibration' })).toBeVisible();
|
||||
});
|
||||
|
||||
test('Settings shows Calibration Control mode toggle', async ({ page }) => {
|
||||
await page.getByRole('navigation').getByRole('link', { name: 'Calibrate', exact: true }).click();
|
||||
await page.goto('/settings');
|
||||
await expect(page.getByRole('heading', { name: 'Calibrate' })).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.getByRole('group', { name: 'Calibration control mode' })).toBeVisible({
|
||||
timeout: 10_000,
|
||||
@@ -85,6 +85,6 @@ test.describe('Page smoke', () => {
|
||||
await expect(page.getByRole('columnheader', { name: 'Time' })).toBeVisible();
|
||||
await expect(page.getByRole('columnheader', { name: 'Action' })).toBeVisible();
|
||||
await expect(page.getByRole('link', { name: /Seer reasoning/i })).toBeVisible();
|
||||
await expect(page.getByText(/No oath rows yet|Loading…/)).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page.getByText(/No oath rows yet|Loading…/)).toBeVisible({ timeout: 15_000 });
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -4,8 +4,11 @@ import { ensureLiveStubAgent, isLiveStubReady } from './live-stub';
|
||||
import { E2E_STUB_AGENT_HOSTNAME, E2E_STUB_AGENT_ID } from './stub-agent';
|
||||
|
||||
const SESSION_ID = 'e2e-rs-lanes-sess';
|
||||
const PATH_TRACE_API = '**/api/v1/pathtrace/**';
|
||||
|
||||
|
||||
test.describe('Path Tracer E2E', () => {
|
||||
let statusReady = false;
|
||||
test.beforeAll(async ({ request }) => {
|
||||
await ensureLiveStubAgent(request);
|
||||
});
|
||||
|
||||
@@ -76,7 +76,7 @@ export async function connectStubAgent(
|
||||
const ws = new WebSocket(wsAgentUrl(baseUrl));
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const timer = setTimeout(() => reject(new Error('stub agent ws open timeout')), 10_000);
|
||||
const timer = setTimeout(() => reject(new Error('stub agent ws open timeout')), 20_000);
|
||||
ws.addEventListener('open', () => {
|
||||
clearTimeout(timer);
|
||||
resolve();
|
||||
|
||||
@@ -4,7 +4,7 @@ export default defineConfig({
|
||||
globalTeardown: './e2e/global-teardown.ts',
|
||||
testDir: './e2e',
|
||||
timeout: 60_000,
|
||||
retries: 0,
|
||||
retries: 1,
|
||||
// Live-server specs share one stub agent_id — parallel workers race on WS auth.
|
||||
workers: process.env.AETHERFORGE_URL ? 1 : undefined,
|
||||
use: {
|
||||
|
||||
Reference in New Issue
Block a user