File size: 874 Bytes
f6213fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require('node:path');

const rootDir = path.resolve(__dirname, '../..');
const port = Number(process.env.PLAYWRIGHT_PORT || 17960);
const baseURL = process.env.PLAYWRIGHT_BASE_URL || `http://127.0.0.1:${port}`;

module.exports = {
  testDir: '.',
  testMatch: '*.spec.js',
  workers: 1,
  timeout: 45_000,
  reporter: [['list']],
  use: {
    baseURL,
    browserName: 'chromium',
    screenshot: 'only-on-failure',
    trace: 'retain-on-failure',
    viewport: { width: 1440, height: 1000 },
    launchOptions: {
      executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE || '/usr/bin/chromium',
      args: ['--no-sandbox'],
    },
  },
  webServer: {
    command: `PORT=${port} ${path.join(rootDir, 'target/release/solverforge_deliveries')}`,
    cwd: rootDir,
    url: `${baseURL}/health`,
    timeout: 20_000,
    reuseExistingServer: false,
  },
};