feat: 支持自定义订阅节点并兼容现有数据库

This commit is contained in:
2026-09-29 11:52:41 +08:00
parent 3faf960f35
commit ab7d1c937a
27 changed files with 2203 additions and 449 deletions
+11 -9
View File
@@ -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,