Release Schema Tools v0.1.0
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { App } from "../../src/App";
|
||||
|
||||
describe("Schema Tools", () => {
|
||||
it("renders capability tiers and validates the bundled local workspace", async () => {
|
||||
vi.stubGlobal(
|
||||
"fetch",
|
||||
vi.fn(async () => new Response("Not found", { status: 404 })),
|
||||
);
|
||||
render(<App />);
|
||||
expect(
|
||||
await screen.findByRole("heading", { name: "Schema Tools" }),
|
||||
).toBeVisible();
|
||||
await screen.findByText(
|
||||
"Five languages, deliberately different guarantees",
|
||||
undefined,
|
||||
{ timeout: 15_000 },
|
||||
);
|
||||
expect(screen.getByText("focused validation")).toBeVisible();
|
||||
expect(screen.getAllByText("structural only")).toHaveLength(2);
|
||||
await userEvent.click(screen.getByRole("tab", { name: "Validate" }));
|
||||
await userEvent.click(
|
||||
screen.getByRole("button", { name: "Validate instance" }),
|
||||
);
|
||||
expect(screen.getByText(/Instance is valid/u)).toBeVisible();
|
||||
expect(screen.getByText("Browser-local")).toBeVisible();
|
||||
}, 20_000);
|
||||
});
|
||||
Reference in New Issue
Block a user