feat: 支持自定义订阅节点并兼容现有数据库
This commit is contained in:
+11
-9
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { test, expect } from "./e2e-fixtures";
|
||||
|
||||
test("compact management flows, drag persistence, filters and mobile layout", async ({
|
||||
page,
|
||||
@@ -22,7 +22,11 @@ test("compact management flows, drag persistence, filters and mobile layout", as
|
||||
["singapore", "Singapore"],
|
||||
["frankfurt", "Frankfurt"],
|
||||
]) {
|
||||
const create = page.locator(".compact-create-panel details");
|
||||
const create = page
|
||||
.locator(".compact-create-panel details")
|
||||
.filter({
|
||||
has: page.getByRole("heading", { name: "新增 HY2 节点", exact: true }),
|
||||
});
|
||||
if ((await create.getAttribute("open")) === null)
|
||||
await create.locator("summary").click();
|
||||
await create.getByLabel("Slug", { exact: true }).fill(slug);
|
||||
@@ -158,13 +162,11 @@ test("compact management flows, drag persistence, filters and mobile layout", as
|
||||
"dashboard",
|
||||
]) {
|
||||
await page.goto(`/admin/${route}`);
|
||||
await expect
|
||||
.poll(() =>
|
||||
page.evaluate(
|
||||
() => document.documentElement.scrollWidth <= window.innerWidth,
|
||||
),
|
||||
)
|
||||
.toBe(true);
|
||||
await expect.poll(() => page.evaluate(() => ({
|
||||
width: document.documentElement.scrollWidth,
|
||||
viewport: innerWidth,
|
||||
overflowing: [...document.querySelectorAll("body *")].filter(el => el.getBoundingClientRect().right > innerWidth && getComputedStyle(el).position !== "absolute").slice(0, 6).map(el => ({ tag: el.tagName, class: el.className, right: el.getBoundingClientRect().right })),
|
||||
}))).toMatchObject({ width: 390, viewport: 390 });
|
||||
await page.screenshot({
|
||||
path: `test-results/${route}-mobile.png`,
|
||||
fullPage: true,
|
||||
|
||||
Reference in New Issue
Block a user