Created
September 19, 2023 14:49
-
-
Save MarcusFelling/dbb6b893676b181ed849308bed707fbc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { defineConfig, devices } from '@playwright/test'; | |
export default defineConfig({ | |
use: { | |
baseURL: 'http://localhost:3000/', | |
}, | |
projects: [ | |
// Setup project | |
{ | |
name: 'setup', | |
testMatch: /.*\.setup\.ts/ | |
}, | |
// Test project that requires authentication | |
{ | |
name: 'authenticated', | |
testMatch: /.account\.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'] | |
}, | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment