@@ -44,6 +44,38 @@ test("parses coordinate CSV and updates the local analysis", async ({
|
||||
expect(external).toEqual([]);
|
||||
});
|
||||
|
||||
test("edits full-feature geometry, inventories tracks and measures locally", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/geo/");
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Track inventory" }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.getByRole("region", { name: "Track inventory" })
|
||||
.getByText("Berlin walk", { exact: true }),
|
||||
).toBeVisible();
|
||||
await page.getByLabel("Editable GeoJSON feature").fill(
|
||||
JSON.stringify({
|
||||
type: "Feature",
|
||||
properties: { name: "Edited point" },
|
||||
geometry: { type: "Point", coordinates: [7.1, 50.7] },
|
||||
}),
|
||||
);
|
||||
await page.getByRole("button", { name: "Apply feature edit" }).click();
|
||||
const featurePicker = page
|
||||
.getByRole("region", { name: "Edit any GeoJSON feature" })
|
||||
.getByRole("combobox");
|
||||
await expect(featurePicker.locator("option:checked")).toHaveText(
|
||||
"1: Edited point",
|
||||
);
|
||||
await page.getByLabel("Start longitude,latitude[,elevation]").fill("0,0");
|
||||
await page.getByLabel("End longitude,latitude[,elevation]").fill("1,0");
|
||||
await expect(page.getByText(/111195/)).toBeVisible();
|
||||
await expect(page.getByText("90.00°")).toBeVisible();
|
||||
});
|
||||
|
||||
test("serves the release identity and hardened headers", async ({
|
||||
request,
|
||||
}) => {
|
||||
@@ -56,7 +88,7 @@ test("serves the release identity and hardened headers", async ({
|
||||
const manifest = await request.get("/deep/nested/geo/toolbox-app.json");
|
||||
await expect(manifest.json()).resolves.toMatchObject({
|
||||
id: "de.add-ideas.geo-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/geo/");
|
||||
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