Exercise document directory at its canonical entry in UI regression tests
This commit is contained in:
@@ -100,11 +100,11 @@ test(
|
|||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
page.setDefaultTimeout(10000);
|
page.setDefaultTimeout(10000);
|
||||||
page.on("pageerror", (error) => errors.push(error.message));
|
page.on("pageerror", (error) => errors.push(error.message));
|
||||||
await page.goto(base!, { waitUntil: "networkidle" });
|
await page.goto(base + "/documents", { waitUntil: "networkidle" });
|
||||||
await page
|
await page
|
||||||
.getByRole("heading", { name: authored.title, exact: true })
|
.getByRole("heading", { name: authored.title, exact: true })
|
||||||
.waitFor();
|
.waitFor();
|
||||||
assert.equal(await page.title(), "探索文档 · 织页");
|
assert.equal(await page.title(), "社区文档 · 织页");
|
||||||
const search = page.getByRole("textbox", { name: "搜索文档" });
|
const search = page.getByRole("textbox", { name: "搜索文档" });
|
||||||
await search.fill("不存在的文档");
|
await search.fill("不存在的文档");
|
||||||
await search.press("Enter");
|
await search.press("Enter");
|
||||||
@@ -248,7 +248,7 @@ test(
|
|||||||
"通过 XML 更新的文档",
|
"通过 XML 更新的文档",
|
||||||
);
|
);
|
||||||
await page.setViewportSize({ width: 390, height: 844 });
|
await page.setViewportSize({ width: 390, height: 844 });
|
||||||
await page.goto(base!, { waitUntil: "networkidle" });
|
await page.goto(base + "/documents", { waitUntil: "networkidle" });
|
||||||
assert.equal(
|
assert.equal(
|
||||||
await page.evaluate(
|
await page.evaluate(
|
||||||
() => document.documentElement.scrollWidth <= window.innerWidth,
|
() => document.documentElement.scrollWidth <= window.innerWidth,
|
||||||
|
|||||||
Reference in New Issue
Block a user