-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathplaywright.config.ts
71 lines (68 loc) · 2.07 KB
/
playwright.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { devices, PlaywrightTestConfig } from '@playwright/test';
// const capabilities = {
// browserName: "Chrome", // Browsers allowed: `Chrome`, `MicrosoftEdge`, `pw-chromium`, `pw-firefox` and `pw-webkit`
// browserVersion: "latest",
// "LT:Options": {
// platform: "Windows 10",
// build: "Playwright Test from config",
// name: "Playwright Test - 1",
// user: '',
// accessKey: '',
// network: true,
// video: true,
// console: true,
// tunnel: false, // Add tunnel configuration if testing locally hosted webpage
// tunnelName: "", // Optional
// geoLocation: '', // country code can be fetched from https://www.lambdatest.com/capabilities-generator/
// },
// };
const config: PlaywrightTestConfig = {
projects: [
{
name: "chrome:latest:MacOS Catalina@lambdatest",
use: {
viewport: { width: 1920, height: 1080 },
},
},
{
name: "chrome:latest:Windows 10@lambdatest",
use: {
viewport: { width: 1280, height: 720 },
},
},
{
name: "chrome",
use: {
...devices["Desktop Chrome"]
}
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"]
}
}
],
testMatch: ["pomtest/addToCartUsingFixture.test.ts"],
use: {
// connectOptions: {
// wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=
// ${encodeURIComponent(JSON.stringify(capabilities))}`
// },
baseURL: "https://ecommerce-playground.lambdatest.io/index.php?",
headless: false,
screenshot: "on",
video: "on",
launchOptions: {
// slowMo: 1000
},
},
timeout: 60 * 1000 * 5,
retries: 0,
reporter: [["dot"], ["json", {
outputFile: "jsonReports/jsonReport.json"
}], ["html", {
open: "never"
}]]
};
export default config;