mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
![]() |
import { PlaywrightTestConfig, devices } from '@playwright/test';
|
||
|
import path from 'path';
|
||
|
|
||
|
// Reference: https://playwright.dev/docs/test-configuration
|
||
|
const config: PlaywrightTestConfig = {
|
||
|
timeout: 30 * 1000,
|
||
|
testDir: path.join(__dirname, '{{testDir}}'),
|
||
|
|
||
|
// Run your local dev server before starting the tests:
|
||
|
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
|
||
|
// webServer: {
|
||
|
// command: 'npm run start',
|
||
|
// port: 3000,
|
||
|
// },
|
||
|
|
||
|
projects: [
|
||
|
{
|
||
|
name: 'Chrome Stable',
|
||
|
use: {
|
||
|
browserName: 'chromium',
|
||
|
// Test against Chrome Stable channel.
|
||
|
channel: 'chrome',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
name: 'Desktop Safari',
|
||
|
use: {
|
||
|
browserName: 'webkit',
|
||
|
viewport: { width: 1200, height: 750 },
|
||
|
}
|
||
|
},
|
||
|
// Test against mobile viewports.
|
||
|
{
|
||
|
name: 'Mobile Chrome',
|
||
|
use: devices['Pixel 5'],
|
||
|
},
|
||
|
{
|
||
|
name: 'Mobile Safari',
|
||
|
use: devices['iPhone 12'],
|
||
|
},
|
||
|
{
|
||
|
name: 'Desktop Firefox',
|
||
|
use: {
|
||
|
browserName: 'firefox',
|
||
|
viewport: { width: 800, height: 600 },
|
||
|
}
|
||
|
},
|
||
|
],
|
||
|
};
|
||
|
export default config;
|