Skip to content

Commit

Permalink
Update playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Oct 15, 2024
1 parent e39b749 commit 937bb53
Show file tree
Hide file tree
Showing 5 changed files with 1,380 additions and 1,066 deletions.
55 changes: 23 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,29 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn run playwright install --with-deps
- run: yarn build

- name: Set Chrome Version
run: |
CHROMEVER="$(chromedriver --version | cut -d' ' -f2)"
echo "Actions ChromeDriver is $CHROMEVER"
echo "CHROMEVER=${CHROMEVER}" >> $GITHUB_ENV
- name: Lint
run: yarn lint

- name: Unit Test
run: yarn test:unit

- name: Chrome Test
run: yarn test:browser --project=chrome

- name: Firefox Test
run: yarn test:browser --project=firefox

- uses: actions/upload-artifact@v3
with:
name: turbo-dist
path: dist/*
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Install Playwright dependencies
run: yarn install --frozen-lockfile
- run: npx playwright install-deps
- run: yarn build

- name: Lint
run: yarn lint

- name: Unit Test
run: yarn test:unit

- name: Run Playwright tests
run: npx playwright test

- uses: actions/upload-artifact@v3
with:
name: turbo-dist
path: dist/*
2 changes: 1 addition & 1 deletion .github/workflows/dev-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'yarn'

- run: yarn install --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
"devDependencies": {
"@open-wc/testing": "^3.1.7",
"@playwright/test": "~1.30.0",
"@playwright/test": "^1.48.0",
"@rollup/plugin-node-resolve": "13.1.3",
"@web/dev-server-esbuild": "^0.3.3",
"@web/test-runner": "^0.15.0",
"@web/test-runner-playwright": "^0.9.0",
"@web/test-runner-playwright": "^0.11.0",
"arg": "^5.0.1",
"body-parser": "^1.20.1",
"chai": "~4.3.4",
Expand All @@ -63,6 +63,6 @@
"lint": "eslint . --ext .js"
},
"engines": {
"node": ">= 14"
"node": ">= 16"
}
}
6 changes: 2 additions & 4 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { devices } from "@playwright/test"

const config = {
projects: [
{
name: "chrome",
use: {
...devices["Desktop Chrome"],
channel: 'chrome',
contextOptions: {
timeout: 60000
},
Expand All @@ -15,7 +13,7 @@ const config = {
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
use: { browserName: 'firefox' },
contextOptions: {
timeout: 60000
},
Expand Down
Loading

0 comments on commit 937bb53

Please sign in to comment.