Skip to content

Commit

Permalink
update playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonLaster committed Aug 9, 2022
1 parent 02854a0 commit 85239f5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:

- name: Run smoke tests on 'rw dev', 'rw serve', 'rw storybook'
working-directory: ./tasks/smoke-test
run: npx playwright test
run: npx playwright test --project replay-chromium
env:
PROJECT_PATH: ${{ steps.setup_test_project.outputs.test_project_path }}
REDWOOD_DISABLE_TELEMETRY: 1
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"packageManager": "yarn@3.2.2",
"npmClient": "yarn",
"dependencies": {
"@replayio/cypress": "^0.2.13"
"@replayio/cypress": "^0.2.13",
"@replayio/playwright": "^0.2.22"
}
}
24 changes: 22 additions & 2 deletions tasks/smoke-test/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
import type { PlaywrightTestConfig } from '@playwright/test'
import { PlaywrightTestConfig, devices} from '@playwright/test'
import { devices as replayDevices } from "@replayio/playwright";

// See https://playwright.dev/docs/test-configuration#global-configuration
const config: PlaywrightTestConfig = {
timeout: 90_000,
expect: {
timeout: 10 * 1000,
},

// Leaving this here to make debugging easier, by uncommenting
// use: {
// launchOptions: {
// slowMo: 500,
// // slowMo: 500,
// headless: false,
// },
// },
projects: [
{
name: "replay-firefox",
use: { ...replayDevices["Replay Firefox"] as any },
},
{
name: "replay-chromium",
use: { ...replayDevices["Replay Chromium"] as any },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "chromium",
use: { ...devices["Desktop Chromium"] },
},
],
}

export default config
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6801,6 +6801,20 @@ __metadata:
languageName: node
linkType: hard

"@replayio/playwright@npm:^0.2.22":
version: 0.2.22
resolution: "@replayio/playwright@npm:0.2.22"
dependencies:
"@replayio/replay": ^0.9.2
uuid: ^8.3.2
peerDependencies:
"@playwright/test": 1.19.x
bin:
replayio-playwright: bin/replayio-playwright.js
checksum: ba573c69ee09a62a9c7612feaa1764fbdc43ba4b365701da72823fad530328425394fee31e8ade52b123c8ecd7e776e56ac688cebb6f560a039840743eb1b291
languageName: node
linkType: hard

"@replayio/replay@npm:^0.9.2":
version: 0.9.2
resolution: "@replayio/replay@npm:0.9.2"
Expand Down Expand Up @@ -27397,6 +27411,7 @@ __metadata:
"@nrwl/nx-cloud": 14.2.0
"@playwright/test": 1.24.2
"@replayio/cypress": ^0.2.13
"@replayio/playwright": ^0.2.22
"@testing-library/jest-dom": 5.16.4
"@testing-library/react": 12.1.5
"@testing-library/react-hooks": 8.0.1
Expand Down

0 comments on commit 85239f5

Please sign in to comment.