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 (disconnectStub) return serverReady;
|
||||||
if (!connectPromise) {
|
if (!connectPromise) {
|
||||||
connectPromise = (async () => {
|
connectPromise = (async () => {
|
||||||
|
try {
|
||||||
serverReady = await waitForServerHealth(request);
|
serverReady = await waitForServerHealth(request);
|
||||||
if (!serverReady) return false;
|
if (!serverReady) return false;
|
||||||
|
|
||||||
const fleetSecret = await fetchFleetSecret(request);
|
const fleetSecret = await fetchFleetSecret(request);
|
||||||
disconnectStub = await connectStubAgent(e2eBaseURL(), fleetSecret);
|
disconnectStub = await connectStubAgent(e2eBaseURL(), fleetSecret);
|
||||||
// Allow agent_online, stats_batch (250ms coalesce), and DB upsert to settle.
|
// 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;
|
return true;
|
||||||
|
} catch { teardownLiveStubAgent(); return false; }
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
return connectPromise;
|
return connectPromise;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ test.describe('LOTL Timeline E2E', () => {
|
|||||||
await expect(page.getByRole('heading', { name: 'LOTL Timeline' })).toBeVisible({
|
await expect(page.getByRole('heading', { name: 'LOTL Timeline' })).toBeVisible({
|
||||||
timeout: 10_000,
|
timeout: 10_000,
|
||||||
});
|
});
|
||||||
await expect(page.getByText('FLEET ONION PROGRESS')).toBeVisible();
|
await expect(page.getByText('FLEET ONION PROGRESS')).toBeVisible({ timeout: 15_000 });
|
||||||
await expect(
|
await expect(
|
||||||
page.locator('.lotl-fleet-chip').filter({ hasText: E2E_STUB_AGENT_HOSTNAME }),
|
page.locator('.lotl-fleet-chip').filter({ hasText: E2E_STUB_AGENT_HOSTNAME }),
|
||||||
).toBeVisible({ timeout: 15_000 });
|
).toBeVisible({ timeout: 15_000 });
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ test.describe('Page smoke', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Settings renders Calibrate', async ({ page }) => {
|
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('heading', { name: 'Calibrate' })).toBeVisible({ timeout: 10_000 });
|
||||||
await expect(page.getByRole('button', { name: 'Save Calibration' })).toBeVisible();
|
await expect(page.getByRole('button', { name: 'Save Calibration' })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Settings shows Calibration Control mode toggle', async ({ page }) => {
|
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('heading', { name: 'Calibrate' })).toBeVisible({ timeout: 10_000 });
|
||||||
await expect(page.getByRole('group', { name: 'Calibration control mode' })).toBeVisible({
|
await expect(page.getByRole('group', { name: 'Calibration control mode' })).toBeVisible({
|
||||||
timeout: 10_000,
|
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: 'Time' })).toBeVisible();
|
||||||
await expect(page.getByRole('columnheader', { name: 'Action' })).toBeVisible();
|
await expect(page.getByRole('columnheader', { name: 'Action' })).toBeVisible();
|
||||||
await expect(page.getByRole('link', { name: /Seer reasoning/i })).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';
|
import { E2E_STUB_AGENT_HOSTNAME, E2E_STUB_AGENT_ID } from './stub-agent';
|
||||||
|
|
||||||
const SESSION_ID = 'e2e-rs-lanes-sess';
|
const SESSION_ID = 'e2e-rs-lanes-sess';
|
||||||
|
const PATH_TRACE_API = '**/api/v1/pathtrace/**';
|
||||||
|
|
||||||
|
|
||||||
test.describe('Path Tracer E2E', () => {
|
test.describe('Path Tracer E2E', () => {
|
||||||
|
let statusReady = false;
|
||||||
test.beforeAll(async ({ request }) => {
|
test.beforeAll(async ({ request }) => {
|
||||||
await ensureLiveStubAgent(request);
|
await ensureLiveStubAgent(request);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export async function connectStubAgent(
|
|||||||
const ws = new WebSocket(wsAgentUrl(baseUrl));
|
const ws = new WebSocket(wsAgentUrl(baseUrl));
|
||||||
|
|
||||||
await new Promise<void>((resolve, reject) => {
|
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', () => {
|
ws.addEventListener('open', () => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default defineConfig({
|
|||||||
globalTeardown: './e2e/global-teardown.ts',
|
globalTeardown: './e2e/global-teardown.ts',
|
||||||
testDir: './e2e',
|
testDir: './e2e',
|
||||||
timeout: 60_000,
|
timeout: 60_000,
|
||||||
retries: 0,
|
retries: 1,
|
||||||
// Live-server specs share one stub agent_id — parallel workers race on WS auth.
|
// Live-server specs share one stub agent_id — parallel workers race on WS auth.
|
||||||
workers: process.env.AETHERFORGE_URL ? 1 : undefined,
|
workers: process.env.AETHERFORGE_URL ? 1 : undefined,
|
||||||
use: {
|
use: {
|
||||||
|
|||||||
Reference in New Issue
Block a user