-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add playwright config for testing more browsers
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* global process */ | ||
import { defineConfig, devices } from '@playwright/test'; | ||
|
||
export default defineConfig({ | ||
workers: process.env.CI ? 1 : undefined, | ||
ignoreSnapshots: !!process.env.CI, | ||
projects: [ | ||
{ | ||
name: 'Chromium', | ||
use: { ...devices['Desktop Chrome'] }, | ||
// Includes unit tests | ||
}, | ||
{ | ||
name: 'Firefox', | ||
use: { ...devices['Desktop Firefox'] }, | ||
testMatch: /e2e/, | ||
}, | ||
{ | ||
name: 'Safari', | ||
use: { ...devices['Desktop Safari'] }, | ||
testMatch: /e2e/, | ||
}, | ||
{ | ||
name: 'Mobile Chrome', | ||
use: { ...devices['Pixel 5'] }, | ||
testMatch: /e2e/, | ||
}, | ||
{ | ||
name: 'Mobile Safari', | ||
use: { ...devices['iPhone 12'] }, | ||
testMatch: /e2e/, | ||
}, | ||
{ | ||
name: 'Google Chrome', | ||
use: { ...devices['Desktop Chrome'], channel: 'chrome' }, | ||
testMatch: /e2e/, | ||
}, | ||
{ | ||
name: 'Microsoft Edge', | ||
use: { ...devices['Desktop Edge'], channel: 'msedge' }, | ||
testMatch: /e2e/, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
set -e | ||
rm -rf coverage | ||
c8 --src public --reporter text --reporter lcov playwright test $1 | ||
c8 --src public --reporter text --reporter lcov playwright test --project Chromium $1 |