08ea5fbe98
添加用户管理视图、API和状态管理文件
68 lines
1.5 KiB
TypeScript
68 lines
1.5 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e/uniapp',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
globalSetup: './e2e/uniapp/global-setup.ts',
|
|
globalTeardown: './e2e/uniapp/global-teardown.ts',
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:8081',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
actionTimeout: 10000,
|
|
navigationTimeout: 30000,
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: { ...devices['Pixel 5'] },
|
|
},
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: { ...devices['iPhone 12'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: 'cd ../everything-is-suitable-uniapp && npm run dev:h5',
|
|
url: 'http://localhost:8081',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120000,
|
|
gracefulShutdown: true,
|
|
terminateOnProcessExit: true
|
|
},
|
|
|
|
reporter: [
|
|
['./e2e/reporters/progress-reporter.ts'],
|
|
['html', { open: 'never' }],
|
|
['json', { outputFile: 'test-results/uniapp-e2e-results.json' }],
|
|
['junit', { outputFile: 'test-results/uniapp-e2e-results.xml' }],
|
|
['list']
|
|
],
|
|
|
|
outputDir: 'test-results/uniapp-artifacts',
|
|
|
|
expect: {
|
|
timeout: 5000
|
|
}
|
|
});
|