Replace fixed waits with waitForAngular in UI tests

The 3s waitForTimeout after page.goto wasn't enough for Angular to
bootstrap and render content. Replace with waitForAngular() helper
that waits for actual DOM elements (nav, headings) up to 15s, with
5s fallback.

32 calls updated across 10 test files.

Also adds waitForAngular to helpers.ts export.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
master
2026-04-02 20:31:34 +03:00
parent 624e132a61
commit 744637c7c6
10 changed files with 47 additions and 24 deletions

View File

@@ -19,6 +19,7 @@
import { execSync } from 'child_process';
import { test, expect } from './live-auth.fixture';
import { waitForAngular } from './helpers';
const SCREENSHOT_DIR = 'e2e/screenshots/integrations';
const BASE = process.env['PLAYWRIGHT_BASE_URL'] || 'https://stella-ops.local';
@@ -620,7 +621,7 @@ test.describe('Integration Services — UI Verification', () => {
test('landing page redirects to first populated tab or shows onboarding', async ({ liveAuthPage: page }) => {
await page.goto(`${BASE}/setup/integrations`, { waitUntil: 'domcontentloaded', timeout: 45_000 });
await page.waitForLoadState('domcontentloaded');
await page.waitForTimeout(3_000);
await waitForAngular(page);
const url = page.url();
// Should either redirect to a tab (registries/scm/ci) or show onboarding