feat(admission): add group VPN exceptions
CI / validate (push) Successful in 5m45s
Release / release (push) Successful in 7m21s

This commit is contained in:
dmg
2026-08-02 10:16:16 -04:00
parent 24808b0f8c
commit 71856bb869
34 changed files with 1820 additions and 138 deletions
@@ -0,0 +1,21 @@
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { UserGroupSelect } from "./user-group-select";
describe("UserGroupSelect", () => {
it("renders the effective group and preserves the active search", () => {
const markup = renderToStaticMarkup(<UserGroupSelect
action={async () => undefined}
effectiveGroupId="group-ops"
groups={[{ id: "group-everyone", name: "everyone" }, { id: "group-ops", name: "Ops" }]}
search="alex smith"
userId="user-one"
userLabel="Alex"
/>);
expect(markup).toContain('aria-label="Group for Alex"');
expect(markup).toContain('<option value="group-ops" selected="">Ops</option>');
expect(markup).toContain('<input type="hidden" name="search" value="alex smith"/>');
expect(markup).toContain("Apply group");
});
});