Release Query Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 10:28:20 +02:00
parent 2730ce08b2
commit f44d0598da
34 changed files with 5153 additions and 300 deletions
+35 -1
View File
@@ -41,6 +41,40 @@ test("retains results on an error and exports", async ({ page }) => {
await page.getByRole("button", { name: "JSON", exact: true }).click();
expect((await pending).suggestedFilename()).toBe("query-result.json");
});
test("runs the locally bundled bounded DuckDB worker in Chromium", async ({
page,
browserName,
request,
}) => {
test.skip(browserName !== "chromium", "Targeted DuckDB-WASM Chromium flow");
const external = await local(page);
await page.goto("/deep/nested/query/");
await page.getByLabel("Execution engine").selectOption("duckdb-wasm");
await page
.getByRole("textbox", { name: "Query", exact: true })
.fill(
"SELECT team, avg(score) AS average FROM data GROUP BY team ORDER BY team",
);
const wasmResponse = page.waitForResponse((response) =>
response.url().endsWith(".wasm"),
);
await page.getByRole("button", { name: "Run query" }).click();
await expect(page.getByRole("status")).toContainText(
"returned 2 result rows",
{
timeout: 60_000,
},
);
await expect(page.getByRole("cell", { name: "blue" })).toBeVisible();
const wasmUrl = (await wasmResponse).url();
const wasm = await request.get(wasmUrl);
expect(wasm.headers()["content-type"]).toBe("application/wasm");
expect(wasm.headers()["cache-control"]).toContain("immutable");
expect(wasm.headers()["content-security-policy"]).toContain(
"'wasm-unsafe-eval'",
);
expect(external).toEqual([]);
});
test("shell PWA headers, offline reload, and theme", async ({
page,
context,
@@ -76,6 +110,6 @@ test("shell PWA headers, offline reload, and theme", async ({
const manifest = await request.get("/deep/nested/query/toolbox-app.json");
await expect(manifest.json()).resolves.toMatchObject({
id: "de.add-ideas.query-tools",
version: "0.1.0",
version: "0.2.0",
});
});
+18
View File
@@ -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/query/");
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);
});