Skip to content

Instantly share code, notes, and snippets.

@MarcusFelling
Created March 8, 2023 16:43
Show Gist options
  • Save MarcusFelling/b22bc753d7207c464e32386a23b0bcbf to your computer and use it in GitHub Desktop.
Save MarcusFelling/b22bc753d7207c464e32386a23b0bcbf to your computer and use it in GitHub Desktop.
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
// Setup project
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
// Test project that requires authentication
{
name: 'authenticated',
testMatch: /.authtests\.ts/,
use: {
...devices['Desktop Chrome'],
// Use prepared auth state.
storageState: '.auth/user.json',
},
dependencies: ['setup'],
},
// Test projects that don't require authentication
{
name: 'chromium',
use: {
...devices['Desktop Chrome']
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox']
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari']
},
}
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment