fix(ui): F3 overlay was always shown as an empty box and could not be closed

This commit is contained in:
Benjamin Oezcan
2026-11-19 15:28:23 +01:00
parent 90f1c9c37e
commit 2bf5a40ebc
2 changed files with 14 additions and 0 deletions

View File

@@ -88,3 +88,16 @@ test('shop purchase is checked and stored by the server', async ({ browser }) =>
expect((await cheat.json()).money).toBe(after);
await ctx.close();
});
test('F3 network overlay: hidden at start, F3 shows it with content, F3 hides it again', async ({ page }) => {
await login(page, 'benni', 'Benni2000!');
const ov = page.locator('#netov');
await expect(ov).toBeHidden(); // regression: an empty box was always on screen
await page.keyboard.press('F3');
await expect(ov).toBeVisible();
await expect(ov).toContainText(/ping/i);
await page.keyboard.press('F3');
await expect(ov).toBeHidden(); // regression: it could not be closed again
await page.keyboard.press('F3');
await expect(ov).toBeVisible();
});