diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1f702fa8..ee661eb5 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -63,7 +63,7 @@ jobs: done - name: ʦ TypeScript - run: npm run typecheck + run: npm run typecheck --if-present working-directory: ./workshop - name: ⬣ Lint @@ -83,7 +83,9 @@ jobs: - name: ⎔ Setup node uses: actions/setup-node@v4 with: - node-version: 26 + # Playwright 1.51's browser install and test runner hang under Node 26. + # The setup matrix above still validates the workshop under Node 26. + node-version: 22 - name: 📦 Install dependencies run: npm ci diff --git a/exercises/04.router/01.solution.router/tests/client-side-routing.test.js b/exercises/04.router/01.solution.router/tests/client-side-routing.test.js index 69f3616b..bc0547e5 100644 --- a/exercises/04.router/01.solution.router/tests/client-side-routing.test.js +++ b/exercises/04.router/01.solution.router/tests/client-side-routing.test.js @@ -11,11 +11,9 @@ test('should display the home page and perform client-side routing', async ({ reloadCount++ }) - // Wait for the page to load - await page.waitForSelector('a') - - // Get the first link - const firstLink = await page.locator('a').first() + // Wait for the streamed search results to replace placeholder "#" links. + const firstLink = page.locator('a[href^="/"]').first() + await firstLink.waitFor() // Get the href attribute of the first link const href = await firstLink.getAttribute('href')