Standardize browser QA at 1920x1080

This commit is contained in:
2026-07-17 22:18:30 +09:00
parent eb41c05f60
commit 8f10d3d67b
29 changed files with 224 additions and 51 deletions

View File

@@ -2,6 +2,7 @@ import { mkdirSync } from 'node:fs';
import { execFileSync } from 'node:child_process';
import { dirname } from 'node:path';
import { chromium } from 'playwright';
import { desktopBrowserContextOptions } from './desktop-browser-viewport.mjs';
const targetUrl = withQaParams(process.env.PUBLIC_QA_URL ?? 'https://comtropy.synology.me/heros_web/');
const screenshotPath = process.env.PUBLIC_QA_SCREENSHOT ?? 'dist/public-deploy-qa.png';
@@ -15,7 +16,7 @@ mkdirSync(dirname(screenshotPath), { recursive: true });
const browser = await chromium.launch({ headless: true });
try {
const page = await browser.newPage({ viewport: { width: 1920, height: 1080 } });
const page = await browser.newPage(desktopBrowserContextOptions);
const consoleMessages = [];
const pageErrors = [];
const requestFailures = [];