fix 前端优化

This commit is contained in:
npc0-hue
2026-07-21 13:44:23 +08:00
parent 0cb91b5f88
commit b06623d0ce
11 changed files with 386 additions and 149 deletions
+15
View File
@@ -37,6 +37,21 @@ describe("AppShell mobile navigation", () => {
expect(html).toContain("关闭导航菜单");
});
it("renders the animation layer above the workspace background", () => {
const html = renderToStaticMarkup(
<AppShell routes={routes} currentPage="home" session={session} operations={[]} onNavigate={() => undefined}>
<p></p>
</AppShell>
);
expect(html.indexOf("workspace-background-layer")).toBeLessThan(html.indexOf("global-particle-layer"));
expect(html).toContain("global-orbital-construct");
expect(html).toContain("global-particle-lightfall");
expect(html).toContain("global-particle-side-ray");
expect(html).not.toContain("global-particle-orbit");
expect(html).not.toContain("global-particle-frame");
});
it("uses bounded edge-swipe thresholds and accessible dismissal", () => {
expect(appShellSource).toContain("start.x <= 28 && deltaX >= 56");
expect(appShellSource).toContain("deltaX <= -56");