feat: release OTP and Passkey Tools 0.1.0
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { Workbench } from "../../src/components/Workbench";
|
||||
|
||||
describe("authentication workbench", () => {
|
||||
it("switches independent workspaces and clears sensitive session state", async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<Workbench />);
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Credential parameters" }),
|
||||
).toBeInTheDocument();
|
||||
await user.click(screen.getByRole("button", { name: /OCRA challenge/iu }));
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "OCRA suite and key" }),
|
||||
).toBeInTheDocument();
|
||||
await user.click(
|
||||
screen.getByRole("button", { name: /WebAuthn \/ Passkeys/iu }),
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "WebAuthn structure" }),
|
||||
).toBeInTheDocument();
|
||||
await user.click(screen.getByRole("button", { name: "Clear session" }));
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "WebAuthn structure" }),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps live ceremonies disabled on the shared/non-dedicated origin", async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<Workbench />);
|
||||
await user.click(
|
||||
screen.getByRole("button", { name: /WebAuthn \/ Passkeys/iu }),
|
||||
);
|
||||
await user.click(screen.getByRole("button", { name: "Live ceremony" }));
|
||||
expect(screen.getByText("Inspect only")).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("button", { name: "Create test credential" }),
|
||||
).toBeDisabled();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user