Skip to content

Commit

Permalink
chore: bump playwright to 1.35.x (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sand4rt authored Jun 21, 2023
1 parent fda12a9 commit 49cca70
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 179 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: '7.x'

- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16.x'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build
run: pnpm build

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

- name: Run Playwright tests
run: pnpm test

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
4 changes: 2 additions & 2 deletions ct-web-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"devDependencies": {
"@sand4rt/experimental-ct-web": "workspace:*",
"@playwright/test": "^1.34.3",
"typescript": "^4.9.5",
"@playwright/test": "^1.35.0",
"typescript": "^5.1.3",
"vite": "^4.1.4"
}
}
4 changes: 2 additions & 2 deletions ct-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"devDependencies": {
"@sand4rt/experimental-ct-web": "workspace:*",
"@playwright/test": "^1.34.3",
"typescript": "^4.9.5",
"@playwright/test": "^1.35.0",
"typescript": "^5.1.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion ct-web/playwright/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type HooksConfig = {
beforeMount<HooksConfig>(async ({ hooksConfig }) => {
console.log(`Before mount: ${JSON.stringify(hooksConfig)}`);
});

afterMount<HooksConfig>(async () => {
console.log(`After mount`);
});
4 changes: 2 additions & 2 deletions playwright-ct-web/hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import type { JsonObject } from '@playwright/experimental-ct-core/types/component';

export declare function beforeMount<HooksConfig extends JsonObject>(
callback: (params: { hooksConfig: HooksConfig }) => Promise<void>
callback: (params: { hooksConfig?: HooksConfig; }) => Promise<void>
): void;
export declare function afterMount<HooksConfig extends JsonObject>(
callback: (params: { hooksConfig: HooksConfig; }) => Promise<void>
callback: (params: { hooksConfig?: HooksConfig; }) => Promise<void>
): void;
4 changes: 1 addition & 3 deletions playwright-ct-web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* limitations under the License.
*/

const { test: baseTest, expect, devices, defineConfig: originalDefineConfig } = require('@playwright/test');
const { fixtures } = require('@playwright/experimental-ct-core/lib/mount');
const { test, expect, devices, defineConfig: originalDefineConfig } = require('@playwright/experimental-ct-core');
const path = require('path');

function plugin() {
Expand All @@ -25,6 +24,5 @@ function plugin() {
};

const defineConfig = config => originalDefineConfig({ ...config, _plugins: [plugin] });
const test = baseTest.extend(fixtures);

module.exports = { test, expect, devices, defineConfig };
8 changes: 4 additions & 4 deletions playwright-ct-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sand4rt/experimental-ct-web",
"version": "1.34.3",
"version": "1.35.0",
"description": "Playwright Component Testing for Web Components",
"homepage": "https://playwright.dev",
"repository": {
Expand Down Expand Up @@ -43,14 +43,14 @@
}
},
"dependencies": {
"@playwright/test": "1.34.3",
"@playwright/experimental-ct-core": "^1.34.3"
"@playwright/test": "1.35.1",
"@playwright/experimental-ct-core": "^1.35.1"
},
"devDependencies": {
"vite": "^4.3.5"
},
"peerDependencies": {
"@playwright/test": ">=1.34.x"
"@playwright/test": ">=1.35.x"
},
"bin": {
"playwright": "./cli.js"
Expand Down
2 changes: 1 addition & 1 deletion playwright-ct-web/register.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

export default function register(components: Record<string, any>): void
export default function pwRegister(components: Record<string, any>): void
4 changes: 2 additions & 2 deletions playwright-ct-web/register.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import { register } from './registerSource.mjs';
import { pwRegister } from './registerSource.mjs';

export default components => {
register(components);
pwRegister(components);
};
Loading

0 comments on commit 49cca70

Please sign in to comment.