Files
co-lite/solvway-admin-portal/app/globals.test.ts
T
ngqileandClaude Opus 5.5 1071ddaa2a feat(admin-portal): cut babyboo portal down to Co-Lite login, users and roles
Removes every other screen, API route, component, test and the dependencies only
they used. Cookie colite_admin, Co-Lite branding, BO_USERS/BO_ROLES modules only.
The user form no longer loads branches, events or country scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-11-26 21:24:30 +08:00

15 lines
780 B
TypeScript

import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
// react-remove-scroll (Radix Select/Dialog/Sheet/DropdownMenu) adds `margin-right: <scrollbar width>`
// to body while scroll is locked; html already reserves that gutter (scrollbar-gutter: stable), so
// without this override the page narrows by the scrollbar width every time an overlay opens.
describe("globals.css", () => {
it("keeps the reserved gutter and cancels scroll-lock's body margin", () => {
const css = readFileSync(join(__dirname, "globals.css"), "utf8");
expect(css).toMatch(/html\s*\{[^}]*scrollbar-gutter:\s*stable/);
expect(css).toMatch(/html body\[data-scroll-locked\]\s*\{[^}]*margin-right:\s*0\s*!important/);
});
});