test: add authenticated staging smoke helper

This commit is contained in:
a.tolmachev
2026-04-07 13:08:32 +03:00
parent e3cd02aa7e
commit 09e6260e32
9 changed files with 136 additions and 12 deletions
+13 -8
View File
@@ -1,5 +1,8 @@
const { defineConfig, devices } = require('@playwright/test');
const baseURL = process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:3300';
const skipWebServer = process.env.PLAYWRIGHT_SKIP_WEB_SERVER === '1';
module.exports = defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
@@ -13,18 +16,20 @@ module.exports = defineConfig({
? [['github'], ['html', { open: 'never' }]]
: [['list'], ['html', { open: 'never' }]],
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:3300',
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
webServer: {
command: 'bash scripts/playwright-stack.sh',
cwd: __dirname,
url: (process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:3300') + '/login',
timeout: 600_000,
reuseExistingServer: false,
},
webServer: skipWebServer
? undefined
: {
command: 'bash scripts/playwright-stack.sh',
cwd: __dirname,
url: `${baseURL}/login`,
timeout: 600_000,
reuseExistingServer: false,
},
projects: [
{
name: 'chromium',