fix: use /trainer as the public trainer route

This commit is contained in:
nyan404 committed 2026-11-17 16:30:06 +03:00
1 parent 74c8504d52
commit d182cd30fa
12 files changed
+21 -14

No files matched your search

+3 -3
View File
@@ -26,7 +26,7 @@ async function run() {
const page = await context.newPage(), errors = [];
page.on('pageerror',error => errors.push(error.message));
page.on('console',message => { if (message.type() === 'error') errors.push(message.text()); });
await page.goto(`${origin}/lu-trainer${width === 768 ? '/' : ''}`);
await page.goto(`${origin}/trainer${width === 768 ? '/' : ''}`);
await page.locator('#scene-grid button').last().waitFor();
assert.equal(await page.title(),'Тренажёр ЛУ — Лесные уступы');
assert.equal(await page.locator('#scene-grid button').count(),60);
@@ -122,7 +122,7 @@ async function run() {
try {
await context.addInitScript(() => { let seed=19; Math.random=()=>{seed=(Math.imul(seed,1664525)+1013904223)>>>0;return seed/2**32;}; });
const page = await context.newPage();
await page.goto(`${origin}/lu-trainer`);
await page.goto(`${origin}/trainer`);
await page.locator('#scene-grid button').last().waitFor();
const cell = id=>page.locator(`#scene-grid button[data-id="${id}"]`);
// Open safe reachable cells until a known adjacent hazard can be reached.
@@ -192,7 +192,7 @@ async function run() {
try {
const page = await broken.newPage();
await page.route('**/lu-trainer/assets/*',route=>route.abort());
await page.goto(`${origin}/lu-trainer`);
await page.goto(`${origin}/trainer`);
await page.locator('#scene-grid button').last().waitFor();
assert(await page.locator('.forest').isHidden());
assert(await page.locator('#character > span').isVisible());