Standardize browser QA at 1920x1080
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user