diff --git a/solvway-admin-portal/app/components/ui/badge.tsx b/solvway-admin-portal/app/components/ui/badge.tsx
index 432760c..6f1886c 100644
--- a/solvway-admin-portal/app/components/ui/badge.tsx
+++ b/solvway-admin-portal/app/components/ui/badge.tsx
@@ -24,7 +24,7 @@ const badgeVariants = cva(
// Category tones (feedback 2026-10-21: every type/fulfilment pill was the same beige). For
// kinds, not states — status keeps positive/warning/negative. Each pill keeps its text label,
// so colour is never the only signal.
- contrast: "border-contrast/30 bg-contrast-soft text-contrast-foreground",
+ contrast: "bg-accent text-accent-foreground",
teal: "border-chart-2/30 bg-chart-2/10 text-chart-2",
violet: "border-chart-4/30 bg-chart-4/10 text-chart-4",
link: "text-primary underline-offset-4 [a&]:hover:underline",
diff --git a/solvway-admin-portal/app/components/ui/card.tsx b/solvway-admin-portal/app/components/ui/card.tsx
index 109b610..3a8d049 100644
--- a/solvway-admin-portal/app/components/ui/card.tsx
+++ b/solvway-admin-portal/app/components/ui/card.tsx
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
) {
return (
{
mocks.useAdminAuth.mockReset().mockReturnValue({ isSuper: true });
});
+const openPicker = async (user: ReturnType) => {
+ const picker = await screen.findByRole("combobox", { name: "Company" });
+ await user.click(picker);
+ return picker;
+};
+
describe("CompanyPicker", () => {
it("is shown to a super admin with All companies plus each company", async () => {
+ const user = userEvent.setup();
renderScope();
- const picker = await screen.findByRole("combobox", { name: "Company" });
- await waitFor(() => expect(picker.querySelectorAll("option")).toHaveLength(3));
- expect([...picker.querySelectorAll("option")].map((o) => o.textContent)).toEqual(["All companies", "INS", "CV"]);
- expect(screen.getByTestId("probe")).toHaveTextContent("undefined|true|CV");
+ await waitFor(() => expect(screen.getByTestId("probe")).toHaveTextContent("undefined|true|CV"));
+ await openPicker(user);
+ expect((await screen.findAllByRole("option")).map((o) => o.textContent)).toEqual(["All companies", "INS", "CV"]);
});
it("is not shown to staff, who never load companies or get a companyId", async () => {
@@ -53,16 +59,29 @@ describe("CompanyPicker", () => {
it("feeds the chosen company into the scope and keeps it for the tab; All companies clears it", async () => {
const user = userEvent.setup();
renderScope();
- const picker = await screen.findByRole("combobox", { name: "Company" });
- await waitFor(() => expect(picker.querySelectorAll("option")).toHaveLength(3));
- await user.selectOptions(picker, "2");
+ await waitFor(() => expect(screen.getByTestId("probe")).toHaveTextContent("undefined|true|CV"));
+ await openPicker(user);
+ await user.click(await screen.findByRole("option", { name: "CV" }));
expect(screen.getByTestId("probe")).toHaveTextContent("2|false|CV");
expect(sessionStorage.getItem("company-scope")).toBe("2");
- await user.selectOptions(picker, "");
+ await openPicker(user);
+ await user.click(await screen.findByRole("option", { name: "All companies" }));
expect(screen.getByTestId("probe")).toHaveTextContent("undefined|true|CV");
expect(sessionStorage.getItem("company-scope")).toBeNull();
});
+ it("opens with Enter, moves with the arrow keys and chooses with Enter", async () => {
+ const user = userEvent.setup();
+ renderScope();
+ await waitFor(() => expect(screen.getByTestId("probe")).toHaveTextContent("undefined|true|CV"));
+ const picker = await screen.findByRole("combobox", { name: "Company" });
+ picker.focus();
+ await user.keyboard("{Enter}");
+ await screen.findByRole("option", { name: "INS" });
+ await user.keyboard("{ArrowDown}{Enter}");
+ expect(screen.getByTestId("probe")).toHaveTextContent("1|false|CV");
+ });
+
it("restores the choice from sessionStorage", async () => {
sessionStorage.setItem("company-scope", "1");
renderScope();
diff --git a/solvway-admin-portal/app/tailwind3-classes.test.ts b/solvway-admin-portal/app/tailwind3-classes.test.ts
index 8c23fb7..33d702b 100644
--- a/solvway-admin-portal/app/tailwind3-classes.test.ts
+++ b/solvway-admin-portal/app/tailwind3-classes.test.ts
@@ -19,7 +19,6 @@ const FILES = globSync("app/**/*.tsx", { cwd: ROOT }).filter((f) => !/\.test\.ts
// selectors/markers, not Tailwind utilities.
const PROJECT_CLASSES = new Set([
"tabular",
- "brand-wordmark",
"scrollable",
"giraffe-spots",
"print-handover",