Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

test(e2e): right-click the desktop from its measured box

Abdurrahman Fakhrul08a6c362e879
diff --git a/scripts/e2e/macos-menu-evidence.mjs b/scripts/e2e/macos-menu-evidence.mjs
index 0321cfde..0300ff00 100644
--- a/scripts/e2e/macos-menu-evidence.mjs
+++ b/scripts/e2e/macos-menu-evidence.mjs
@@ -35,7 +35,12 @@ export async function menuEvidence({ page, check, shot }, theme) {
expect(axe.violations.map(v => ({ id: v.id, targets: v.nodes.map(n => n.target) }))).toEqual([]);
});
await check(theme + " desktop context menu bounds and radius", async () => {
- await page.mouse.click(1504, 160, { button: "right" });
+ // Right-click the bare desktop near its right edge so the menu opens at the
+ // clamped corner. A fixed pixel sat exactly on the section boundary and broke
+ // whenever the shell laid the desktop out a few px differently.
+ const desktop = page.locator("#main-content section").first();
+ const desktopBox = await desktop.boundingBox();
+ await page.mouse.click(desktopBox.x + desktopBox.width - 12, desktopBox.y + 40, { button: "right" });
const menu = page.locator('.macos-menu[role="menu"]');
await expect(menu).toBeVisible();
await menuChrome(menu);