Skip to content

Commit 8ab2530

Browse files
committed
Add playwright to make sure that tabs tests can run in CI
1 parent 8a9c7f2 commit 8ab2530

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: Test bundles and tabs
7777
if: needs.paths-filter.outputs.modules == 'true'
78-
run: yarn test:modules
78+
run: playwright install --with-deps && yarn test:modules
7979

8080
- name: Build manifest
8181
if: needs.paths-filter.outputs.devserver == 'true'

devserver/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineConfig(({ mode }) => {
3333
find: /^js-slang\/context/,
3434
replacement: pathlib.resolve(import.meta.dirname, 'src', 'mockModuleContext.ts')
3535
}, {
36-
// This alias configuration allows us to edit the modules library and the changes
36+
// This alias configuration allows us to edit the modules library and have the changes
3737
// be reflected in real time when in hot-reload mode
3838
find: /^@sourceacademy\/modules-lib/,
3939
replacement: '.',

lib/modules-lib/src/tabs/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* @module Tabs
44
* @title Tabs Library
55
*/
6+
7+
// This file is necessary so that the documentation generated by typedoc comes out in
8+
// the correct format. Don't actually import anything from this file
9+
// (not that you should be able to)
10+
611
export { default as AnimationCanvas, type AnimCanvasProps } from './AnimationCanvas';
712
export { default as AnimationError } from './AnimationError';
813
export { default as AutoLoopSwitch, type AutoLoopSwitchProps } from './AutoLoopSwitch';

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@types/node": "^22.15.30",
5959
"@types/react": "^18.3.1",
6060
"@types/react-dom": "^18.3.1",
61+
"@vitest/browser": "^3.2.3",
6162
"@vitest/coverage-v8": "^3.2.3",
6263
"@vitest/eslint-plugin": "^1.3.4",
6364
"@yarnpkg/types": "^4.0.1",
@@ -71,9 +72,11 @@
7172
"husky": "^9.1.7",
7273
"jsdom": "^26.1.0",
7374
"jsonc-eslint-parser": "^2.4.0",
75+
"playwright": "^1.54.1",
7476
"typescript": "^5.8.2",
7577
"typescript-eslint": "^8.33.1",
7678
"vitest": "^3.2.3",
79+
"vitest-browser-react": "^1.0.0",
7780
"yarnhook": "^0.6.0"
7881
},
7982
"dependencies": {

yarn.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,6 +3474,7 @@ __metadata:
34743474
"@types/node": "npm:^22.15.30"
34753475
"@types/react": "npm:^18.3.1"
34763476
"@types/react-dom": "npm:^18.3.1"
3477+
"@vitest/browser": "npm:^3.2.3"
34773478
"@vitest/coverage-v8": "npm:^3.2.3"
34783479
"@vitest/eslint-plugin": "npm:^1.3.4"
34793480
"@yarnpkg/types": "npm:^4.0.1"
@@ -3489,11 +3490,13 @@ __metadata:
34893490
jsdom: "npm:^26.1.0"
34903491
jsonc-eslint-parser: "npm:^2.4.0"
34913492
lodash: "npm:^4.17.21"
3493+
playwright: "npm:^1.54.1"
34923494
react: "npm:^18.3.1"
34933495
react-dom: "npm:^18.3.1"
34943496
typescript: "npm:^5.8.2"
34953497
typescript-eslint: "npm:^8.33.1"
34963498
vitest: "npm:^3.2.3"
3499+
vitest-browser-react: "npm:^1.0.0"
34973500
yarnhook: "npm:^0.6.0"
34983501
languageName: unknown
34993502
linkType: soft

0 commit comments

Comments
 (0)