Skip to content

Commit 08cd2d8

Browse files
committed
refactor: add new e2e config
1 parent 0a090bf commit 08cd2d8

File tree

4 files changed

+21
-44
lines changed

4 files changed

+21
-44
lines changed

test/config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ChromiumEnv, FirefoxEnv, WebKitEnv, test, setConfig, PlaywrightOptions } from "@playwright/test"
2+
3+
setConfig({
4+
testDir: "e2e", // Search for tests in this directory.
5+
timeout: 30000, // Each test is given 30 seconds.
6+
})
7+
8+
const options: PlaywrightOptions = {
9+
headless: true, // Run tests in headless browsers.
10+
video: "retain-on-failure",
11+
}
12+
13+
// Run tests in three browsers.
14+
test.runWith(new ChromiumEnv(options), { tag: "chromium" })
15+
test.runWith(new FirefoxEnv(options), { tag: "firefox" })
16+
test.runWith(new WebKitEnv(options), { tag: "webkit" })

test/jest.e2e.config.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"license": "MIT",
33
"#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.",
44
"devDependencies": {
5-
"@playwright/test": "^0.1101.0",
5+
"@playwright/test": "^0.1101.0-alpha2",
66
"@types/jest": "^26.0.20",
77
"@types/jsdom": "^16.2.6",
88
"@types/node-fetch": "^2.5.8",

test/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,10 +1258,10 @@
12581258
"@types/yargs" "^15.0.0"
12591259
chalk "^4.0.0"
12601260

1261-
"@playwright/test@^0.1101.0":
1262-
version "0.1101.0"
1263-
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-0.1101.0.tgz#73f1195a9fd0c23b4efeff8cd2cd760f94247789"
1264-
integrity sha512-yn/psASZhjKKCOJi9oW/5ImZx9wjlXhKvGVtleOC10XxhV0wshBf3eL+40G9o5VjJ8KwJaujj+mFadBrHjEs5w==
1261+
"@playwright/test@^0.1101.0-alpha2":
1262+
version "0.1101.0-alpha2"
1263+
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-0.1101.0-alpha2.tgz#a1121ac70e6ac986532ea63c6f565f06fae99364"
1264+
integrity sha512-DDJQCTn5iLR2J5T/Fl+BhR9V7G++Y6HmSBLgn3blRZ8HWsJRseD6nowuhUij51rhDiLdJJLVmF4/sVJCqtPGMQ==
12651265
dependencies:
12661266
folio "=0.3.23-alpha"
12671267
playwright "=1.10.0"

0 commit comments

Comments
 (0)