Fix 22 UI tests: auto-retry assertions instead of point-in-time checks
Problem: After waitForAngular, content assertions ran before Angular's
XHR data loaded. Tests checked textContent('body') at a point when
the table/heading hadn't rendered yet.
Fix: Replace point-in-time checks with Playwright auto-retry assertions:
- expect(locator).toBeVisible({ timeout: 15_000 }) — retries until visible
- expect(locator).toContainText('X', { timeout: 15_000 }) — retries until text appears
- expect(rows.first()).toBeVisible() — retries until table has data
Also: landing page test now uses waitForFunction to detect Angular redirect.
10 files changed, net -45 lines (simpler, more robust assertions).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -122,8 +122,7 @@ test.describe('GitLab Integration — UI Verification', () => {
|
||||
});
|
||||
await waitForAngular(page);
|
||||
|
||||
const pageContent = await page.textContent('body');
|
||||
expect(pageContent).toContain('GitLab');
|
||||
await expect(page.locator('text=GitLab').first()).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
await snap(page, 'gitlab-scm-tab');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user