commit b3588fe488415556b21d2f34289045e9f6b8affe
parent 4b608055e1ee0041c54bcfe0148098d012d76e72
Author: anon <anon@example.com>
Date: Mon, 9 Nov 2026 00:18:58 +0000
Use Shift-wheel orbit in the browser weapon shop test
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/client/test_basic_shop_weapons.mjs b/tools/client/test_basic_shop_weapons.mjs
@@ -86,7 +86,7 @@ try {
assert.deepEqual((await server()).inventory, evidence.purchased.inventory);
await page.keyboard.press('Control+1');
- // Use the browser's world-wheel camera control to frame the nearby Leet.
+ // Use Shift-wheel camera orbit to frame the nearby Leet.
const cameraPoint = await game.point(400, 200);
await page.mouse.move(cameraPoint.x, cameraPoint.y);
const deadline = Date.now() + 10000;
@@ -96,8 +96,10 @@ try {
if (y >= 500 && y <= 600) break;
assert(Date.now() < deadline, 'Camera did not frame the controlled Leet');
const angles = game.state.camera.angles;
- await page.mouse.wheel(0, y > 600 ? 40 : -40);
- await game.wait('world wheel changes the camera', state =>
+ await page.keyboard.down('Shift');
+ try { await page.mouse.wheel(0, y > 600 ? 40 : -40); }
+ finally { await page.keyboard.up('Shift'); }
+ await game.wait('Shift-wheel changes the camera', state =>
state.camera.angles.some((angle, index) => angle !== angles[index]));
}