Files
ozone-tech_owl_prime/e2e/smoke.spec.ts
Даня Архипов b5985f33bb feat: ship production deploy, Playwright e2e, and agent implementer
Add Docker atomic deploy tooling, CI, Playwright smoke/visual suite,
shared industrial theme, physics invariants, quality-mode wiring,
and a worktree-isolated agent implementer MVP with hard safety limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 17:14:01 +00:00

32 lines
1.2 KiB
TypeScript

import { test, expect } from '@playwright/test';
test.describe('smoke', () => {
test('home opens, canvas loads, play works', async ({ page }) => {
const pageErrors: Error[] = [];
page.on('pageerror', (err) => pageErrors.push(err));
await page.goto('/');
const loading = page.locator('.three-loading');
const canvas = page.locator('canvas');
await expect(loading.or(canvas).first()).toBeVisible({ timeout: 30_000 });
await expect(canvas).toBeVisible({ timeout: 60_000 });
await expect(page.getByTestId('demo-hud')).toBeVisible();
await expect(page.getByTestId('demo-play')).toBeVisible();
await page.getByTestId('demo-play').click();
await expect(page.getByTestId('demo-pause')).toBeVisible({ timeout: 10_000 });
await expect(page.getByTestId('demo-status')).not.toHaveText('FINISHED');
const finished = page.getByTestId('demo-finished');
if (await finished.isVisible().catch(() => false)) {
await page.getByTestId('demo-play').click();
await expect(finished).toBeHidden({ timeout: 10_000 });
await expect(page.getByTestId('demo-pause')).toBeVisible({ timeout: 10_000 });
}
expect(pageErrors, `pageerrors: ${pageErrors.map((e) => e.message).join('; ')}`).toEqual([]);
});
});