Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
import { loginToDashboard } from './fixtures';
|
|
import { ensureLiveStubAgent, isLiveStubReady } from './live-stub';
|
|
import { E2E_STUB_AGENT_HOSTNAME, E2E_STUB_LOTL_BADGE } from './stub-agent';
|
|
|
|
test.describe('Crucible LOTL', () => {
|
|
test.beforeAll(async ({ request }) => {
|
|
await ensureLiveStubAgent(request);
|
|
});
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
test.skip(
|
|
!isLiveStubReady(),
|
|
'Requires live E2E server (test-suite phase 8 on :18989 or AETHERFORGE_URL)',
|
|
);
|
|
await loginToDashboard(page);
|
|
});
|
|
|
|
test('Crucible node card shows LOTL tier badge from stub stats', async ({ page }) => {
|
|
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: E2E_STUB_AGENT_HOSTNAME });
|
|
await expect(card).toBeVisible({ timeout: 15_000 });
|
|
await expect(card.getByText(E2E_STUB_LOTL_BADGE)).toBeVisible({ timeout: 15_000 });
|
|
});
|
|
|
|
test('Onion timeline shows stub agent tier progression', async ({ page }) => {
|
|
await page.getByRole('navigation').getByRole('link', { name: 'Onion', exact: true }).click();
|
|
await expect(page.getByRole('heading', { name: 'LOTL Timeline' })).toBeVisible({
|
|
timeout: 10_000,
|
|
});
|
|
await expect(
|
|
page.locator('.lotl-fleet-chip').filter({ hasText: E2E_STUB_AGENT_HOSTNAME }),
|
|
).toBeVisible({ timeout: 15_000 });
|
|
await expect(page.getByText('ONION TIER CHAIN')).toBeVisible();
|
|
await expect(page.locator('.lotl-tier-timeline')).toBeVisible();
|
|
// Stub lotl_attempts: container (aliases to docker) failed — spread onion timeline.
|
|
await expect(page.locator('.lotl-tier-step--failed', { hasText: /Docker/i })).toBeVisible({
|
|
timeout: 15_000,
|
|
});
|
|
});
|
|
});
|