fix install config

This commit is contained in:
Ildar Kamalov
2025-02-18 17:31:04 +03:00
parent 0a3346d911
commit 58faa7c537
5 changed files with 9 additions and 21 deletions

View File

@@ -1,17 +1,8 @@
import { chromium, FullConfig } from '@playwright/test';
import { existsSync, renameSync } from 'fs';
import { chromium, type FullConfig } from '@playwright/test';
import { ADMIN_USERNAME, ADMIN_PASSWORD, PORT } from '../constants';
export const CONFIG_FILE = 'AdGuardHome.yaml';
export const TEMP_CONFIG_FILE = 'AdGuardHome.yaml.temp';
async function globalSetup(config: FullConfig) {
// Backup existing config file if it exists
if (existsSync(CONFIG_FILE)) {
renameSync(CONFIG_FILE, TEMP_CONFIG_FILE);
}
const browser = await chromium.launch({
slowMo: 100,
});