Give initial chunk readiness an explicit CI timeout
This commit is contained in:
+12
-1
@@ -7,7 +7,18 @@ async function enter(page, name = 'Wayfarer') {
|
||||
await page.getByRole('button', { name: 'Enter world' }).click();
|
||||
await expect(page.locator('#connection-status')).toHaveText('Connected');
|
||||
await expect(page.locator('#game-controls')).toBeVisible();
|
||||
await expect.poll(() => page.evaluate(() => (window as any).__aeternalis?.diagnostics().chunks)).toBe(9);
|
||||
// Software-rendered CI can take longer than the default 5s to process the
|
||||
// initial snapshot. test.slow() extends the test, not this assertion's budget.
|
||||
// Keep the nine-chunk requirement and include both sides in failure output.
|
||||
await expect.poll(() => page.evaluate(() => {
|
||||
const game = (window as any).__aeternalis;
|
||||
return {
|
||||
connection: document.getElementById('connection-status')?.textContent,
|
||||
subscribedChunks: game?.snapshot?.chunkKeys.length ?? 0,
|
||||
renderedChunks: game?.diagnostics().chunks ?? 0,
|
||||
};
|
||||
}), { timeout: 20000, message: 'Initial server subscription and rendered terrain must contain all nine chunks' })
|
||||
.toEqual({ connection: 'Connected', subscribedChunks: 9, renderedChunks: 9 });
|
||||
}
|
||||
|
||||
test('desktop renders models, moves authoritatively, gathers, and reconnects', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user