feat(admin): Playwright E2E каркас — TESTIDS, login/shell/roles, CI mock. Refs EventHub/EventHubFrontAdmin#33 #34 #35
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
const port = Number(process.env.E2E_PORT || 4173);
|
||||
const baseURL = process.env.E2E_BASE_URL || `http://127.0.0.1:${port}`;
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e/tests',
|
||||
fullyParallel: false,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
workers: 1,
|
||||
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',
|
||||
timeout: 90_000,
|
||||
expect: { timeout: 10_000 },
|
||||
use: {
|
||||
baseURL,
|
||||
trace: 'on-first-retry',
|
||||
locale: 'ru-RU',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'mock',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
testIgnore: /ift\//,
|
||||
},
|
||||
{
|
||||
name: 'ift-smoke',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
baseURL: process.env.E2E_IFT_BASE_URL || 'https://admin-ui.ift.eventhub.local',
|
||||
ignoreHTTPSErrors: true,
|
||||
},
|
||||
testMatch: /ift\//,
|
||||
},
|
||||
],
|
||||
webServer:
|
||||
process.env.E2E_TARGET === 'ift'
|
||||
? undefined
|
||||
: {
|
||||
command: `npm run preview -- --host 127.0.0.1 --port ${port}`,
|
||||
url: baseURL,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120_000,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user