Commit Graph

4 Commits

Author SHA1 Message Date
master
9402f1a558 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>
2026-04-02 22:04:52 +03:00
master
744637c7c6 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>
2026-04-02 20:31:34 +03:00
master
0aaadef8e7 Fix 36 test failures: withRetry for 504s, domcontentloaded for UI, aggregation UI test
Three fixes resolving the cascading test failures:

1. Add withRetry() to integrations.e2e.spec.ts advisory section — the
   6 API tests that 504'd on Concelier transport now retry up to 2x

2. Change all UI test page.goto from networkidle to domcontentloaded
   across 9 test files — networkidle never fires when Angular XHR
   calls 504, causing 30 UI tests to timeout. domcontentloaded fires
   when HTML is parsed, then 3s wait lets Angular render.

3. Fix test dependencies — vault-consul-secrets detail test now creates
   its own integration instead of depending on prior test state.

New test: catalog page aggregation report — verifies the advisory
source catalog page shows stats bar metrics and per-source freshness
data (the UI we built earlier this session).

Files changed: integrations.e2e.spec.ts, vault-consul-secrets, ui-*,
runtime-hosts, gitlab-integration, error-resilience, aaa-advisory-sync

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:45:37 +03:00
master
3f6fb501dd Add GitLab, pagination, activity timeline, and error resilience e2e tests
Four new test suites expanding integration hub e2e coverage:

- gitlab-integration.e2e.spec.ts: Container health, direct probe, connector
  CRUD lifecycle (create/test/health/delete), SCM tab UI verification.
  Gracefully skips when GitLab container not running (heavy profile).

- pagination.e2e.spec.ts: API-level pagination (pageSize, page params,
  totalPages, sorting, last-page edge case, out-of-range page).
  UI pager rendering verification.

- activity-timeline.e2e.spec.ts: Page load, stats bar, activity items,
  event type filter dropdown, clear filters, back navigation.
  Tests against mock data rendered by the activity component.

- error-resilience.e2e.spec.ts: Unreachable endpoint returns failure/unhealthy,
  non-existent resource 404s, malformed input handling, duplicate name
  creation, UI empty tab rendering, deleted integration detail page.

Also adds GitLab config to shared helpers.ts INTEGRATION_CONFIGS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 19:02:18 +03:00