Skip to content

Commit a84167a

Browse files
ci: allow workshops without a typecheck script (#31)
* ci: allow workshops without typecheck script Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * ci: install Playwright with supported Node version Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * ci: run Playwright tests on Node 22 Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * test: wait for routable ship link Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * test: select pathname-based ship route Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent bc65ebc commit a84167a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/validate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ jobs:
9292
- name: ⎔ Setup node
9393
uses: actions/setup-node@v4
9494
with:
95-
node-version: 26
95+
# Playwright 1.51's browser install and test runner hang under Node 26.
96+
# The setup matrix above still validates the workshop under Node 26.
97+
node-version: 22
9698

9799
- name: 📦 Install dependencies
98100
run: npm ci

exercises/04.router/01.solution.router/tests/client-side-routing.test.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ test('should display the home page and perform client-side routing', async ({
1111
reloadCount++
1212
})
1313

14-
// Wait for the page to load
15-
await page.waitForSelector('a')
16-
17-
// Get the first link
18-
const firstLink = await page.locator('a').first()
14+
// Wait for the streamed search results to replace placeholder "#" links.
15+
const firstLink = page.locator('a[href^="/"]').first()
16+
await firstLink.waitFor()
1917

2018
// Get the href attribute of the first link
2119
const href = await firstLink.getAttribute('href')

0 commit comments

Comments
 (0)