Serve Dock directly and add explicit navigation feedback
This commit is contained in:
1 parent
645afe3ebf
commit
84c4b3030a
77 files changed
+477
-920
No files matched your search
+16
-24
@@ -29,7 +29,7 @@ async function check(name, fn) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
await check("HTTP root and gallery", async () => {
|
||||
await check("HTTP root standalone app", async () => {
|
||||
const r = await page.goto(base);
|
||||
assert.equal(r.status(), 200);
|
||||
assert.equal(await page.locator("#concepts, #compare, #second").count(), 0);
|
||||
@@ -39,7 +39,7 @@ try {
|
||||
),
|
||||
false,
|
||||
);
|
||||
await page.frameLocator("#preview-a").locator("h1").waitFor();
|
||||
await page.locator("h1").waitFor();
|
||||
await page.screenshot({ path: "references/gallery.png", fullPage: true });
|
||||
});
|
||||
for (const c of concepts)
|
||||
@@ -240,26 +240,17 @@ try {
|
||||
);
|
||||
}
|
||||
});
|
||||
await check("Approved Dock controls and actual mobile viewport", async () => {
|
||||
await page.goto(base);
|
||||
await page.locator("#theme").selectOption("dark");
|
||||
await page.locator("#density").selectOption("compact");
|
||||
await page.locator("#page").selectOption("users");
|
||||
await page.locator("[data-size=mobile]").click();
|
||||
await page.frameLocator("#preview-a").locator("#user-search").waitFor();
|
||||
assert.equal(
|
||||
await page
|
||||
.frameLocator("#preview-a")
|
||||
.locator("body")
|
||||
.getAttribute("data-concept"),
|
||||
"dock",
|
||||
);
|
||||
await check("Standalone mobile viewport and theme", async () => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await page.goto(base + "/?page=users&theme=dark");
|
||||
await page.locator("#user-search").waitFor();
|
||||
assert.equal(await page.locator("iframe,#workspace,#page").count(), 0);
|
||||
assert.equal(await page.locator("body").getAttribute("data-theme"), "dark");
|
||||
assert.ok(
|
||||
await page.locator("#preview-a").evaluate((e) => e.clientWidth <= 390),
|
||||
await page.evaluate(
|
||||
() => document.documentElement.scrollWidth <= innerWidth,
|
||||
),
|
||||
);
|
||||
await page.locator("#accent").fill("#ffcc00");
|
||||
await page.locator("#accent").dispatchEvent("change");
|
||||
await page.frameLocator("#preview-a").locator("h1").waitFor();
|
||||
});
|
||||
await check("Mobile navigation and density variants", async () => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
@@ -286,19 +277,20 @@ try {
|
||||
}
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await page.goto(base);
|
||||
await page.frameLocator("#preview-a").locator("h1").waitFor();
|
||||
await page.locator("h1").waitFor();
|
||||
});
|
||||
await check("Export archive download", async () => {
|
||||
await page.goto(base + "/?page=tokens");
|
||||
const download = page.waitForEvent("download");
|
||||
await page.locator("#export").click();
|
||||
await page.locator("[data-action=download-system]").click();
|
||||
const d = await download;
|
||||
await d.saveAs("test-results/anidev-export.zip");
|
||||
assert.match(d.suggestedFilename(), /anidev-dock.zip/);
|
||||
});
|
||||
await check("Gallery mobile overflow", async () => {
|
||||
await check("Standalone mobile overflow", async () => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await page.goto(base);
|
||||
await page.frameLocator("#preview-a").locator("h1").waitFor();
|
||||
await page.locator("h1").waitFor();
|
||||
assert.ok(
|
||||
await page.evaluate(
|
||||
() => document.documentElement.scrollWidth <= innerWidth + 1,
|
||||
|
||||
Reference in new issue
Block a user