Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: "yarn"

- name: Install dependencies
run: yarn
Expand All @@ -37,12 +37,11 @@ jobs:

- name: Save build in cache
id: cache-build
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: dist
key: cache-${{ github.sha }}


# Run linters
linters:
runs-on: ubuntu-latest
Expand All @@ -57,7 +56,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: "yarn"
node-version: ${{ matrix.node-version }}

- name: Install dependencies
Expand All @@ -69,7 +68,6 @@ jobs:
- name: Run tests
run: yarn test:linters


# Run playwright tests
components:
runs-on: ubuntu-latest
Expand All @@ -89,25 +87,27 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: "yarn"

- name: Restore build from cache
id: cache-build
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: dist
key: cache-${{ github.sha }}

- name: Install dependencies
run: yarn

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Build tsconfig
run: yarn build:tsconfig

- name: Run components' unit tests
run: yarn test:unit --shard=${{ matrix.shard-index }}/${{ matrix.shard-total }}


# Run module tests
modules:
runs-on: ubuntu-latest
Expand All @@ -125,14 +125,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache: "yarn"

- name: Restore build from cache
id: cache-build
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: dist
key: cache-${{ github.sha }}
path: dist
key: cache-${{ github.sha }}

- name: Install dependencies
run: yarn
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $RECYCLE.BIN
# Build && test
/coverage
/storybook-static
/test-results
/.nyc_output
/dist
/tsconfig.json
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"webpack-cli": "5.1.4"
},
"devDependencies": {
"@playwright/test": "1.32.1",
"@playwright/test": "1.49.0",
"@storybook/addon-essentials": "7.0.23",
"@storybook/addon-interactions": "7.0.23",
"@storybook/addon-links": "7.0.23",
Expand All @@ -180,7 +180,7 @@
"jest": "29.7.0",
"jest-runner-eslint": "2.1.2",
"nyc": "15.1.0",
"playwright": "1.32.1",
"playwright": "1.49.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"storybook": "7.0.23",
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/p-v4-components-demo/test/api/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class DemoPage {
await this.page.goto(concatURLs(this.baseUrl, `${this.pageFileName}.html`) + (query.length > 0 ? `?${query}` : ''), {waitUntil: 'networkidle'});
await root.waitFor({state: 'attached'});

this.component = await root.evaluateHandle((ctx) => ctx.component);
this.component = await root.evaluate((ctx) => (<DemoPage><unknown>ctx).component);

return this;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://github.com/V4Fire/Client/blob/master/LICENSE
*/

import type { Page, JSHandle } from 'playwright';
import type { Page, JSHandle, ElementHandle } from 'playwright';

import { evalFn } from 'core/prelude/test-env/components/json';

Expand Down Expand Up @@ -96,7 +96,7 @@ export default class Utils {
moduleName = `${moduleName}/index.ts`;
}

return <Promise<JSHandle<T>>>page.evaluateHandle(
return <Promise<ElementHandle<T>>>page.evaluateHandle(
([{moduleName}]) => globalThis.importModule(moduleName), [{moduleName}]
);
}
Expand Down
43 changes: 21 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3007,19 +3007,14 @@ __metadata:
languageName: node
linkType: hard

"@playwright/test@npm:1.32.1":
version: 1.32.1
resolution: "@playwright/test@npm:1.32.1"
"@playwright/test@npm:1.49.0":
version: 1.49.0
resolution: "@playwright/test@npm:1.49.0"
dependencies:
"@types/node": "npm:*"
fsevents: "npm:2.3.2"
playwright-core: "npm:1.32.1"
dependenciesMeta:
fsevents:
optional: true
playwright: "npm:1.49.0"
bin:
playwright: cli.js
checksum: 496236db5867eec9b80a485c3facf926294ab93d2f4fc981fe1518a1534ff09c08fcbe3c02cd70b11c05aa5f27b0ffa32f262c20c94e7f4f375d034e827b56bb
checksum: e87485ab4c02b6dc0bc20a43ea3965c949c45caa4e7f5beea4a0abd29be0a318662931e887072db0d165f8dde93709b97ea1b2c6f4c833b403aa13427d76dd22
languageName: node
linkType: hard

Expand Down Expand Up @@ -5719,7 +5714,7 @@ __metadata:
"@babel/preset-env": "npm:7.16.11"
"@babel/preset-typescript": "npm:7.16.7"
"@config/config": "npm:config@1.31.0"
"@playwright/test": "npm:1.32.1"
"@playwright/test": "npm:1.49.0"
"@pzlr/build-core": "npm:2.13.0"
"@pzlr/stylus-inheritance": "npm:3.3.0"
"@statoscope/webpack-plugin": "npm:5.25.1"
Expand Down Expand Up @@ -5806,7 +5801,7 @@ __metadata:
nyc: "npm:15.1.0"
path-equal: "npm:1.1.3"
path-to-regexp: "npm:3.2.0"
playwright: "npm:1.32.1"
playwright: "npm:1.49.0"
portfinder: "npm:1.0.28"
postcss: "npm:8.4.6"
postcss-discard-comments: "npm:6.0.0"
Expand Down Expand Up @@ -20153,23 +20148,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.32.1":
version: 1.32.1
resolution: "playwright-core@npm:1.32.1"
"playwright-core@npm:1.49.0":
version: 1.49.0
resolution: "playwright-core@npm:1.49.0"
bin:
playwright: cli.js
checksum: 90786f1ef3b82781f151c0f389511e67807d995a055b3200e78d1ce2a1e6d6762b984a5b26a438d7360f21eb54bb0c0f672b55ff244fcc6c654bde644aaced94
playwright-core: cli.js
checksum: ef9c708293adab100337ed7fd8e61660be381707fc2b84f07b5f40d1ead44feb6a8e52fef98075e594522229d15a9ad56dd1471689cfa59409bec6447c22944d
languageName: node
linkType: hard

"playwright@npm:1.32.1":
version: 1.32.1
resolution: "playwright@npm:1.32.1"
"playwright@npm:1.49.0":
version: 1.49.0
resolution: "playwright@npm:1.49.0"
dependencies:
playwright-core: "npm:1.32.1"
fsevents: "npm:2.3.2"
playwright-core: "npm:1.49.0"
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 34a23bf3c599741bb8aaaf26fe6d2cecb643efdf24cac7867a956eb998a2be83df5a8f91ced562bb04a0de4d78fbefcc5d1d99e24907c6e16dcf7b4e5b3f8638
checksum: 1fb198d09d388ec46cc2f0fc6b889a8bde8a75066ded82d35f08ba333091ebf3fc4ddf11263a86058a7078c7238ec4f23a86a9f1dc3ebd4f610c9eb07841fb32
languageName: node
linkType: hard

Expand Down
Loading