Release Healer Man 0.1.48
This commit is contained in:
1 parent
2162039b49
commit
39425f2494
9 files changed
+219
-40
No files matched your search
@@ -2,6 +2,7 @@ const { chromium } = require('C:/Users/phenom/.cache/codex-runtimes/codex-primar
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const assert = require('node:assert/strict');
|
||||
const crypto = require('node:crypto');
|
||||
const selectedBossName = process.env.BOSS_TEST_BOSS || 'Lady Anacondra';
|
||||
const directory = path.resolve(process.env.BOSS_TEST_ARTIFACT_DIR || path.join(
|
||||
'playtest-artifacts',
|
||||
@@ -38,6 +39,30 @@ const base = process.env.BOSS_TEST_URL || 'http://127.0.0.1:4187';
|
||||
await page.screenshot({ path: path.join(directory, `${name}.png`) });
|
||||
console.log(`Captured ${name}`);
|
||||
};
|
||||
const canvasHash = async () => {
|
||||
const canvas = page.locator('canvas');
|
||||
await canvas.evaluate((element) => {
|
||||
const hidden = [];
|
||||
let current = element;
|
||||
while (current.parentElement) {
|
||||
for (const sibling of current.parentElement.children) {
|
||||
if (sibling === current || !(sibling instanceof HTMLElement)) continue;
|
||||
hidden.push([sibling, sibling.style.visibility]);
|
||||
sibling.style.visibility = 'hidden';
|
||||
}
|
||||
current = current.parentElement;
|
||||
}
|
||||
window.__restoreCanvasCapture = () => {
|
||||
for (const [node, visibility] of hidden) node.style.visibility = visibility;
|
||||
delete window.__restoreCanvasCapture;
|
||||
};
|
||||
});
|
||||
try {
|
||||
return crypto.createHash('sha256').update(await canvas.screenshot()).digest('hex');
|
||||
} finally {
|
||||
await page.evaluate(() => window.__restoreCanvasCapture?.());
|
||||
}
|
||||
};
|
||||
try {
|
||||
await page.goto(base, { waitUntil: 'domcontentloaded' });
|
||||
console.log('Production menu loaded');
|
||||
@@ -66,6 +91,13 @@ const base = process.env.BOSS_TEST_URL || 'http://127.0.0.1:4187';
|
||||
return game.assetStatus === 'ready' && game.bossTest?.runtimeIds.every((id) => useCombatStore.getState().mobs[id]);
|
||||
}, null, { timeout: 90000 });
|
||||
await page.waitForTimeout(4000);
|
||||
const bossFrameBefore = await canvasHash();
|
||||
await page.waitForTimeout(500);
|
||||
assert.notEqual(
|
||||
await canvasHash(),
|
||||
bossFrameBefore,
|
||||
'Boss Testing redraws the WebGL scene independently from its HUD and nameplates',
|
||||
);
|
||||
await capture('03-empty-room');
|
||||
const before = await page.evaluate(async () => {
|
||||
const { useGameStore, useCombatStore, useShellStore } = await window.bossTestingStores();
|
||||
|
||||
Reference in new issue
Block a user