@@ -54,6 +54,27 @@ test("imports CSV headings and exports an inspectable model", async ({
|
||||
expect((await pending).suggestedFilename()).toBe("fixture-model.json");
|
||||
});
|
||||
|
||||
test("imports composite constraints and exposes topological coverage", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/fixture/");
|
||||
await page.getByLabel("Fixture model source").fill(`CREATE TABLE tenants (
|
||||
region VARCHAR(8), tenant_id INTEGER, PRIMARY KEY (region, tenant_id)
|
||||
);
|
||||
CREATE TABLE events (
|
||||
region VARCHAR(8), tenant_id INTEGER,
|
||||
FOREIGN KEY (region, tenant_id) REFERENCES tenants(region, tenant_id)
|
||||
);`);
|
||||
await page.getByRole("button", { name: "Import model" }).click();
|
||||
await page.getByRole("button", { name: "Generate fixtures" }).click();
|
||||
await page.getByRole("button", { name: "Coverage" }).click();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Constraint coverage matrix" }),
|
||||
).toBeVisible();
|
||||
await expect(page.getByText("tenants → events")).toBeVisible();
|
||||
await expect(page.getByText(/foreignKey\(region,tenant_id\)/u)).toBeVisible();
|
||||
});
|
||||
|
||||
test("retains results after a failed import and downloads output", async ({
|
||||
page,
|
||||
}) => {
|
||||
@@ -97,7 +118,7 @@ test("integrates help, themes, PWA identity and hardened headers", async ({
|
||||
const manifest = await request.get("/deep/nested/fixture/toolbox-app.json");
|
||||
await expect(manifest.json()).resolves.toMatchObject({
|
||||
id: "de.add-ideas.fixture-tools",
|
||||
version: "0.1.0",
|
||||
version: "0.2.0",
|
||||
privacy: { processing: "local", telemetry: false },
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user