Skip to content

Commit

Permalink
feat: мобильные устройства для тестирования в Playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
mxseev committed Feb 3, 2022
1 parent d6f358f commit c9aca77
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */

import {PlaywrightTestConfig} from "@playwright/test"
import {PlaywrightTestConfig, devices} from "@playwright/test"

const isCI = !!process.env.CI

Expand All @@ -11,14 +11,52 @@ const config: PlaywrightTestConfig = {
testMatch: /.*\.test\.ts/,
use: {
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "on-first-retry"
},
webServer: {
command: "npm run start",
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: !isCI
}
},
projects: [
{
name: "Desktop Chrome",
use: {
browserName: "chromium",
...devices["Desktop Chrome"]
}
},
{
name: "Desktop Firefox",
use: {
browserName: "firefox",
...devices["Desktop Firefox"]
}
},
{
name: "Desktop Safari",
use: {
browserName: "webkit",
...devices["Desktop Safari"]
}
},
{
name: "Pixel 5",
use: {
browserName: "chromium",
...devices["Pixel 5"]
}
},
{
name: "iPhone 12",
use: {
browserName: "webkit",
...devices["iPhone 12"]
}
}
]
}

export default config
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c9aca77

Please sign in to comment.