fix: relink rust web tree editor runtime
This commit is contained in:
@@ -56,12 +56,21 @@ async function main() {
|
||||
const floatingAi = page.getByTestId("wolai-floating-ai");
|
||||
const floatingHelp = page.getByTestId("wolai-floating-help");
|
||||
const content = page.locator(".mnote-content").first();
|
||||
const homeContent = page.locator(".mnote-home").first();
|
||||
const staticHomeLinks = page.locator(".mnote-home-links");
|
||||
const documentShell = page.locator(".document-shell").first();
|
||||
const emptyState = page.locator('[data-testid="mnote-workspace-empty-state"]').first();
|
||||
|
||||
assert.equal(await staticHomeLinks.count(), 0, "根页仍使用 .mnote-home-links 静态设计列表作为主内容");
|
||||
const hasDocumentShell = (await documentShell.count()) > 0;
|
||||
const hasEmptyState = (await emptyState.count()) > 0;
|
||||
assert(hasDocumentShell || hasEmptyState, "根页必须渲染真实 active page shell 或明确空 workspace state");
|
||||
|
||||
const sidebarBox = await boundingBox(sidebar, "左侧栏");
|
||||
const topbarBox = await boundingBox(topbar, "顶栏");
|
||||
const contentBox = await boundingBox(content, "主内容区");
|
||||
const homeContentBox = await boundingBox(homeContent, "首页正文");
|
||||
const primaryContentBox = hasDocumentShell
|
||||
? await boundingBox(documentShell, "active page shell")
|
||||
: await boundingBox(emptyState, "空 workspace state");
|
||||
const floatingAiBox = await boundingBox(floatingAi, "AI 浮动按钮");
|
||||
const floatingHelpBox = await boundingBox(floatingHelp, "帮助浮动按钮");
|
||||
|
||||
@@ -73,8 +82,8 @@ async function main() {
|
||||
assert(contentBox.y >= topbarBox.y + topbarBox.height - 2, "主内容区不应被顶栏遮挡");
|
||||
assert(floatingAiBox.x > sidebarBox.width, "AI 浮动按钮不应落入左侧栏");
|
||||
assert(floatingHelpBox.x > sidebarBox.width, "帮助浮动按钮不应落入左侧栏");
|
||||
assert(!boxesIntersect(floatingAiBox, homeContentBox), "AI 浮动按钮不应遮挡首页正文");
|
||||
assert(!boxesIntersect(floatingHelpBox, homeContentBox), "帮助浮动按钮不应遮挡首页正文");
|
||||
assert(!boxesIntersect(floatingAiBox, primaryContentBox), "AI 浮动按钮不应遮挡主内容");
|
||||
assert(!boxesIntersect(floatingHelpBox, primaryContentBox), "帮助浮动按钮不应遮挡主内容");
|
||||
assert(floatingHelpBox.y > floatingAiBox.y, "帮助按钮应位于 AI 按钮下方");
|
||||
|
||||
await page.screenshot({ path: SCREENSHOT_PATH, fullPage: true });
|
||||
|
||||
Reference in New Issue
Block a user