From efc6d89e079b5b16d8c7c74067766cfcc2b259e8 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Mon, 5 Oct 2026 22:47:17 -0700 Subject: [PATCH] Wait for account restoration before injecting the renderer fixture --- system/tests/oskiewar-practice.browser.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/tests/oskiewar-practice.browser.mjs b/system/tests/oskiewar-practice.browser.mjs index fcbf1fd0cd..82bf796dd0 100644 --- a/system/tests/oskiewar-practice.browser.mjs +++ b/system/tests/oskiewar-practice.browser.mjs @@ -26,6 +26,9 @@ try { await page.setViewport({width:1200,height:900}); await page.goto('https://oskiewar.com/?practice',{waitUntil:'domcontentloaded'}); await page.waitForFunction(()=>globalThis.__oskiewarTouch?.screen,{timeout:60000}); + // Finish the anonymous account probe before injecting this renderer fixture. + await page.waitForFunction(()=>globalThis.__oskiewarAccount?.ready,{timeout:60000}); + await page.evaluate(()=>globalThis.__oskiewarWizard.restoreSaved()); await page.evaluate(()=>{globalThis.__oskiewarFighterAppearance={handle:'@fixture',validUntil:Date.now()+600000,appearance:{skin:[217,164,126],hair:[54,42,34],shirt:[54,95,144],pants:[24,55,104],shoes:[235,235,235],hairStyle:'short',beard:false,glasses:false,sleeves:'long'}};}); await page.keyboard.down('Enter'); await new Promise(r=>setTimeout(r,300)); await page.keyboard.up('Enter'); await page.waitForFunction(()=>globalThis.__oskiewarTouch?.practiceFighter==='@fixture',{timeout:30000}); @@ -38,6 +41,9 @@ try { await page.evaluate(()=>{globalThis.__oskiewarFighterAppearance.validUntil=1;}); await page.waitForFunction(()=>!globalThis.__oskiewarTouch?.practiceModel); + // Finish the anonymous account probe before injecting this renderer fixture. + await page.waitForFunction(()=>globalThis.__oskiewarAccount?.ready,{timeout:60000}); + await page.evaluate(()=>globalThis.__oskiewarWizard.restoreSaved()); await page.evaluate(()=>{globalThis.__oskiewarFighterAppearance=null;}); await page.waitForFunction(()=>!globalThis.__oskiewarTouch?.practiceFighter); assert.deepEqual(errors,[]); assert.deepEqual(sockets,[]); assert.deepEqual(replays,[]); -- 2.51.2