mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-20 11:44:09 +08:00
use const for test config file
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled
This commit is contained in:
parent
58faa7c537
commit
26b0eddaca
3
client/playwright.config.ts
vendored
3
client/playwright.config.ts
vendored
@ -1,6 +1,7 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
import path from 'path';
|
||||
import { CONFIG_FILE_PATH } from './tests/constants';
|
||||
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
@ -42,7 +43,7 @@ export default defineConfig({
|
||||
|
||||
webServer: {
|
||||
stdout: process.env.CI ? 'pipe' : 'ignore',
|
||||
command: `${!process.env.CI ? 'sudo ' : ''}./AdGuardHome --local-frontend -v -c /tmp/AdGuard.temp.e2e.yaml`,
|
||||
command: `${!process.env.CI ? 'sudo ' : ''}./AdGuardHome --local-frontend -v -c ${CONFIG_FILE_PATH}`,
|
||||
url: 'http://127.0.0.1:3000',
|
||||
cwd: '..',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
|
@ -1,3 +1,4 @@
|
||||
export const ADMIN_USERNAME = 'admin';
|
||||
export const ADMIN_PASSWORD = 'superpassword';
|
||||
export const PORT = 3000;
|
||||
export const CONFIG_FILE_PATH = '/tmp/AdGuard.e2e.yaml';
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { existsSync, unlinkSync } from 'fs';
|
||||
|
||||
export const CONFIG_FILE = '/tmp/AdGuard.temp.e2e.yaml';
|
||||
import { CONFIG_FILE_PATH } from '../constants';
|
||||
|
||||
async function globalTeardown() {
|
||||
// Remove the test config file
|
||||
if (existsSync(CONFIG_FILE)) {
|
||||
unlinkSync(CONFIG_FILE);
|
||||
if (existsSync(CONFIG_FILE_PATH)) {
|
||||
unlinkSync(CONFIG_FILE_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user