Files
SpaceWanderer/e2e/smoke.spec.ts
T
kamilkrzywda e19c068c98 e2e: smoke + state specs, CI-only against isolated dind stack
playwright.config.ts mirrors Flight-Ops shape (remote browser default ws://192.168.1.4:3000/,
PW_REMOTE_BROWSER=0 local, E2E_BASE_URL/E2E_DEPLOY_CMD optional). smoke.spec.ts: landing
page + scificn components + /api/version. state.spec.ts: mid-run docker compose restart
via E2E_COMPOSE_ARGS, re-asserts the app serves (no auth — single player by design).
2026-09-28 15:56:40 +00:00

22 lines
935 B
TypeScript

import { expect, test } from '@playwright/test';
test('landing page loads with the SpaceWanderer title', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'SpaceWanderer' })).toBeVisible();
});
test('scificn-ui themed components render on the landing page', async ({ page }) => {
await page.goto('/');
// Panel header badge + footer button prove the copy-paste component layer is wired in.
await expect(page.getByText('SYS:ONLINE')).toBeVisible();
await expect(page.getByRole('button', { name: 'INITIATE' })).toBeVisible();
});
test('GET /api/version reports the app version as JSON', async ({ page }) => {
const res = await page.request.get('/api/version');
expect(res.status()).toBe(200);
expect(res.headers()['content-type']).toContain('application/json');
const body = (await res.json()) as { version: string };
expect(body.version).toMatch(/^\d+\.\d+\.\d+$/);
});