Stabilize Playwright phase 8 E2E to 25 green specs.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Harden login and online-card assertions, fix multi-hop discover spread selection, add Path Tracer RS lanes mock E2E, and graceful stub WS teardown.
This commit is contained in:
AetherForge
2026-06-07 07:01:35 -07:00
parent bd041edc0e
commit e3d7ecc33f
9 changed files with 73 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
import { expect, test } from '@playwright/test';
import { loginToDashboard } from './fixtures';
import { expectOnlineCrucibleCard, loginToDashboard } from './fixtures';
import { ensureLiveStubAgent, isLiveStubReady } from './live-stub';
import {
ensureDiscoverSpreadStub,
@@ -14,9 +14,7 @@ import { E2E_STUB_AGENT_HOSTNAME, E2E_STUB_AGENT_ID } from './stub-agent';
async function openCrucibleSpreadTab(page: import('@playwright/test').Page, hostname: string) {
await page.getByRole('link', { name: /Crucible/i }).click();
await expect(page.getByRole('heading', { name: 'Crucible' })).toBeVisible({ timeout: 10_000 });
const card = page.locator('.crucible-node-card').filter({ hasText: hostname });
await expect(card).toBeVisible({ timeout: 15_000 });
await expect(card.locator('.cn-status-dot.on')).toBeVisible({ timeout: 15_000 });
const card = await expectOnlineCrucibleCard(page, hostname);
await card.click();
await expect(
page.locator('.crucible-actions-card').getByText(new RegExp(`${hostname}`)),
@@ -116,14 +114,21 @@ test.describe('Crucible discover and spread E2E', () => {
timeout: 15_000,
});
// Stub propagates join_lane stats to downstream hops with staggered delays.
await page.waitForTimeout(2_000);
for (const hop of [seed, leaf]) {
const card = page.locator('.crucible-node-card').filter({ hasText: hop.hostname });
await expect(card).toBeVisible({ timeout: 15_000 });
await expect(card.locator('.cn-status-dot.on')).toBeVisible({ timeout: 15_000 });
// Crucible toggles multi-select — clear egress (and any prior hop) before focusing downstream.
const selectedCards = page.locator('.crucible-node-card.selected');
for (let i = 0, n = await selectedCards.count(); i < n; i++) {
await selectedCards.first().click();
}
const card = await expectOnlineCrucibleCard(page, hop.hostname);
await card.scrollIntoViewIfNeeded();
await card.click();
await expect(
page.locator('.crucible-actions-card').getByText(new RegExp(`${hop.hostname}`)),
).toBeVisible({ timeout: 10_000 });
).toBeVisible({ timeout: 20_000 });
await page.getByRole('button', { name: 'LATERAL / SPREAD' }).click();
await expect(page.locator('.access-depth-panel')).toContainText(hop.joinLabel, {
timeout: 20_000,