diff --git a/scripts/verify-public-deploy.mjs b/scripts/verify-public-deploy.mjs index 462a511..786fca6 100644 --- a/scripts/verify-public-deploy.mjs +++ b/scripts/verify-public-deploy.mjs @@ -4,7 +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 expectedTitle = '\uC0BC\uAD6D\uC9C0: \uC138 \uD615\uC81C\uC758 \uB9F9\uC138'; const relevantLogPattern = /asset|audio|cannot|failed|map|missing|portrait|sprite|story|texture|unit/i; mkdirSync(dirname(screenshotPath), { recursive: true }); @@ -45,6 +45,7 @@ try { title: document.title, canvasCount: document.querySelectorAll('canvas').length, debugApiPresent: Boolean(window.__HEROS_DEBUG__), + gameApiPresent: Boolean(window.__HEROS_GAME__), canvas: canvas ? { width: canvas.width, @@ -91,6 +92,7 @@ try { 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.gameApiPresent === false, `Expected public deploy to keep game handle disabled: ${JSON.stringify(state)}`); assert(state.canvas?.width >= 960 && state.canvas?.height >= 540, `Expected desktop-size game canvas: ${JSON.stringify(state)}`); assert(state.canvas?.pixelProbe?.readable === true, `Expected readable canvas pixels: ${JSON.stringify(state)}`); assert(state.canvas.pixelProbe.sampleCount >= 500, `Expected enough canvas pixel samples: ${JSON.stringify(state)}`);