Verify public page title
This commit is contained in:
@@ -4,6 +4,7 @@ import { chromium } from 'playwright';
|
||||
|
||||
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';
|
||||
const expectedTitle = '삼국지: 세 형제의 맹세';
|
||||
const relevantLogPattern = /asset|audio|cannot|failed|map|missing|portrait|sprite|story|texture|unit/i;
|
||||
|
||||
mkdirSync(dirname(screenshotPath), { recursive: true });
|
||||
@@ -87,7 +88,7 @@ try {
|
||||
}
|
||||
});
|
||||
|
||||
assert(state.title?.trim().length > 0, `Expected deployed page title: ${JSON.stringify(state)}`);
|
||||
assert(state.title === expectedTitle, `Expected deployed page title "${expectedTitle}": ${JSON.stringify(state)}`);
|
||||
assert(state.canvasCount === 1, `Expected exactly one game canvas: ${JSON.stringify(state)}`);
|
||||
assert(state.debugApiPresent === false, `Expected public deploy to keep debug API disabled: ${JSON.stringify(state)}`);
|
||||
assert(state.canvas?.width >= 960 && state.canvas?.height >= 540, `Expected desktop-size game canvas: ${JSON.stringify(state)}`);
|
||||
|
||||
Reference in New Issue
Block a user