Backend modules from tastefully 8bd93d15: core-libs, core-session, api-gateway, mobile-api, services-auth, services-system, services-counter, services-member, services-log, services-email. solvway-admin-portal from babyboo f64d096ea, solvway-customer-portal from tastefully 8bd93d15. Copied as tracked files only. Literal secrets replaced with environment placeholders: - services-email: SMTP_PASSWORD, MAILGUN_API_KEY, SENDGRID_API_KEY, MAILJET_API_KEY, MAILJET_SECRET_KEY (optional, empty default) - services-system: JUMIO_TOKEN, JUMIO_SECRET (optional) - services-auth: USER_AUTH_API_SECRET (required); commented JWT secret removed - core-libs: JWT_TOKEN default removed (required), XXL_JOB_TOKEN default removed, ipgeolocation key read from IPGEOLOCATION_API_KEY - services-system EkycAppConfig: commented Jumio credentials removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
35 lines
1.8 KiB
TypeScript
35 lines
1.8 KiB
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/);
|
|
});
|
|
|
|
it("marks today on the admin calendar with a bold ring that selected days skip", () => {
|
|
const css = readFileSync(join(__dirname, "globals.css"), "utf8");
|
|
const rule = css.match(
|
|
/\.rdp-root\.admin-calendar\s+\.rdp-today:not\(\.rdp-selected\):not\(\.rdp-outside\)\s+\.rdp-day_button\s*\{([^}]*)\}/,
|
|
);
|
|
expect(rule).not.toBeNull();
|
|
expect(rule![1]).toMatch(/font-weight:\s*700/);
|
|
expect(rule![1]).toMatch(/box-shadow:\s*inset\s+0\s+0\s+0\s+2px\s+var\(--primary\)/);
|
|
});
|
|
|
|
it("keeps today visible when selected, with a primary-foreground ring over the fill", () => {
|
|
const css = readFileSync(join(__dirname, "globals.css"), "utf8");
|
|
const rule = css.match(
|
|
/\.rdp-root\.admin-calendar\s+\.rdp-today\.rdp-selected:not\(\.rdp-outside\)\s+\.rdp-day_button\s*\{([^}]*)\}/,
|
|
);
|
|
expect(rule).not.toBeNull();
|
|
expect(rule![1]).toMatch(/font-weight:\s*700/);
|
|
expect(rule![1]).toMatch(/box-shadow:\s*inset\s+0\s+0\s+0\s+2px\s+var\(--primary-foreground\)/);
|
|
});
|
|
});
|