@@ -109,6 +109,32 @@ test("shows a hardened XML error while retaining the last successful model", asy
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("infers a schema and applies a reviewed exact-number edit", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/data/");
|
||||
await expect(page.getByText(/Parsed as JSON/iu)).toBeVisible();
|
||||
await page.getByRole("tab", { name: /Schema & edit/iu }).click();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Schema inference" }),
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole("rowheader", { name: "/project" })).toBeVisible();
|
||||
await page.getByLabel(/JSON Pointer/iu).fill("/exactInteger");
|
||||
await page.getByLabel("Value type").selectOption("number");
|
||||
await page
|
||||
.locator(".edit-value-field textarea")
|
||||
.fill("9007199254740993123456790");
|
||||
await page.getByRole("button", { name: "Preview edit" }).click();
|
||||
await expect(
|
||||
page.getByText("No known loss or coercion in this conversion."),
|
||||
).toBeVisible();
|
||||
await page.getByRole("button", { name: "Apply preview to source" }).click();
|
||||
await expect(page.getByTestId("source-editor")).toHaveValue(
|
||||
/9007199254740993123456790/u,
|
||||
);
|
||||
await expect(page.getByText(/Parsed as JSON/iu)).toBeVisible();
|
||||
});
|
||||
|
||||
test("serves the release identity and hardened headers", async ({
|
||||
request,
|
||||
}) => {
|
||||
@@ -124,7 +150,7 @@ test("serves the release identity and hardened headers", async ({
|
||||
const manifest = await request.get("/deep/nested/data/toolbox-app.json");
|
||||
await expect(manifest.json()).resolves.toMatchObject({
|
||||
id: "de.add-ideas.data-tools",
|
||||
version: "0.1.0",
|
||||
version: "0.2.0",
|
||||
entry: "./",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("keeps the primary workspace inside a narrow viewport", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/data/");
|
||||
await expect(page.locator("main").first()).toBeVisible();
|
||||
await expect(
|
||||
page.locator("main .loading, main .workbench-loading"),
|
||||
).toHaveCount(0);
|
||||
|
||||
const widths = await page.evaluate(() => ({
|
||||
content: document.documentElement.scrollWidth,
|
||||
viewport: document.documentElement.clientWidth,
|
||||
}));
|
||||
expect(widths.viewport).toBeLessThanOrEqual(430);
|
||||
expect(widths.content).toBeLessThanOrEqual(widths.viewport + 1);
|
||||
});
|
||||
Reference in New Issue
Block a user