From dd724d5a2cac7ccf4e4ed35976293c0a4dd1a5e4 Mon Sep 17 00:00:00 2001 From: Helias Date: Sat, 6 Jun 2026 23:34:14 +0200 Subject: [PATCH 1/3] fix(e2e): replace flaky networkidle waits with web-first assertions waitForLoadState('networkidle') never settles when the external Google Fonts CDN stalls on CI, causing intermittent 30s timeouts in the E2E job. Wait on auto-retrying assertions (toHaveTitle / app-root visible) instead. --- e2e/app.spec.ts | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/e2e/app.spec.ts b/e2e/app.spec.ts index 1c85685..60e5416 100644 --- a/e2e/app.spec.ts +++ b/e2e/app.spec.ts @@ -3,17 +3,11 @@ import { test, expect } from '@playwright/test'; test.describe('Git Catalogue App', () => { test('should load the application', async ({ page }) => { - // Navigate to the application await page.goto('/'); - - // Wait for the page to load - await page.waitForLoadState('networkidle'); - - // Check that the page loaded successfully by looking for Angular content - // The app should have loaded without critical errors + + // Web-first assertions auto-wait; avoid networkidle, which hangs on the + // external Google Fonts CDN and makes this flaky on CI. await expect(page).toHaveTitle('GitCatalogue'); - - // Check that the main app component is present await expect(page.locator('app-root')).toBeVisible(); }); @@ -37,13 +31,12 @@ test.describe('Git Catalogue App', () => { } }); - // Navigate to the application await page.goto('/'); - - // Wait for the page to fully load - await page.waitForLoadState('networkidle'); - - // Assert that there are no critical console errors + + // Wait for Angular to bootstrap rather than networkidle, which never + // settles when the external Google Fonts CDN stalls on CI. + await expect(page.locator('app-root')).toBeVisible(); + expect(errors).toEqual([]); }); }); \ No newline at end of file From e58cab5596f1c1fbfbe968b6fa317ad543c6ba41 Mon Sep 17 00:00:00 2001 From: Helias Date: Sat, 6 Jun 2026 23:54:55 +0200 Subject: [PATCH 2/3] fix(ci): install Playwright browsers after npm ci The E2E job failed with 'Executable doesn't exist at chromium_headless_shell-1187'. 'npx playwright install' ran before 'npm ci', so with no node_modules npx fetched the latest Playwright (1.60.0) and installed browser revision 1223, while the pinned @playwright/test 1.55.0 looks for revision 1187 at test time. Run the browser install after 'npm ci' so npx resolves the project's pinned Playwright and downloads the matching browser build. --- .github/workflows/e2e.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5ce4759..89de48d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -28,9 +28,6 @@ jobs: - name: Setup Chrome uses: browser-actions/setup-chrome@v1 - - name: Install Playwright Browsers - run: npx playwright install --with-deps chromium - - name: Set Playwright Chrome executable for CI run: echo "PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome" >> $GITHUB_ENV @@ -45,6 +42,13 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund + # Must run after `npm ci` so npx resolves the project's pinned + # @playwright/test and installs the matching browser build. Running it + # before `npm ci` makes npx fetch the latest Playwright and install a + # browser revision the pinned version can't find at test time. + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium + - name: Prepare E2E config and data fixtures run: | mkdir -p src/assets/data From 5e239a2f086768f662feb360ef48e9b518352e8e Mon Sep 17 00:00:00 2001 From: Helias Date: Sat, 6 Jun 2026 23:57:37 +0200 Subject: [PATCH 3/3] ci: remove useless comments --- .github/workflows/e2e.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 89de48d..01bc0ce 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -2,9 +2,9 @@ name: E2E on: push: - branches: [ main, master ] + branches: [main, master] pull_request: - branches: [ '**' ] + branches: ['**'] jobs: test-e2e: @@ -42,10 +42,6 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund - # Must run after `npm ci` so npx resolves the project's pinned - # @playwright/test and installs the matching browser build. Running it - # before `npm ci` makes npx fetch the latest Playwright and install a - # browser revision the pinned version can't find at test time. - name: Install Playwright Browsers run: npx playwright install --with-deps chromium