29 lines
997 B
JavaScript
29 lines
997 B
JavaScript
'use strict';
|
|||
|
|
|
||
|
|
// Playwright UI tests. They expect a running instance with the seed data:
|
||
|
|
// tests/ui/stack.sh starts one (see the README's "UI tests" section).
|
||
|
|
const { defineConfig, devices } = require('@playwright/test');
|
||
|
|
|
||
|
|
const CI = !!process.env.CI;
|
||
|
|
|
||
|
|
module.exports = defineConfig({
|
||
|
|
testDir: '.',
|
||
|
|
testMatch: '**/*.ui.js',
|
||
|
|
// One shared database: run serially so tests can't race each other.
|
||
|
|
workers: 1,
|
||
|
|
fullyParallel: false,
|
||
|
|
forbidOnly: CI,
|
||
|
|
retries: CI ? 1 : 0,
|
||
|
|
timeout: 30_000,
|
||
|
|
expect: { timeout: 10_000 },
|
||
|
|
reporter: CI ? [['list'], ['html', { open: 'never' }]] : 'list',
|
||
|
|
use: {
|
||
|
|
baseURL: process.env.TINKER_UI_URL || 'http://127.0.0.1:8400',
|
||
|
|
trace: 'retain-on-failure',
|
||
|
|
screenshot: 'only-on-failure',
|
||
|
|
},
|
||
|
|
projects: [
|
||
|
|
{ name: 'desktop', use: { ...devices['Desktop Chrome'], viewport: { width: 1280, height: 900 } }, testIgnore: '**/responsive.ui.js' },
|
||
|
|
{ name: 'mobile', use: { ...devices['Pixel 7'] }, testMatch: '**/responsive.ui.js' },
|
||
|
|
],
|
||
|
|
});
|