refactor(app): remove unused components

This commit is contained in:
2026-07-13 14:02:27 +08:00
parent b89bde1b55
commit 34c6f5523c
29 changed files with 32 additions and 892 deletions
@@ -13,7 +13,6 @@ import { MessageAvatar } from "../message-avatar";
import { PrivateMessageCard } from "../private-message-card";
import { PwaInstallDialog } from "../pwa-install-dialog";
import { TextBubble } from "../text-bubble";
import { VoiceUnlockOptionsDialog } from "../voice-unlock-options-dialog";
vi.mock("@/router/use-app-navigator", () => ({
useAppNavigator: () => ({
@@ -296,37 +295,4 @@ describe("chat Tailwind components", () => {
expect(html).toContain("Top up now");
});
it("renders VoiceUnlockOptionsDialog action choices", () => {
expect(
renderToStaticMarkup(
<VoiceUnlockOptionsDialog
open={false}
onClose={() => undefined}
onBuyVoicePackage={() => undefined}
onActivateVip={() => undefined}
/>,
),
).toBe("");
const html = renderToStaticMarkup(
<VoiceUnlockOptionsDialog
open
onClose={() => undefined}
onBuyVoicePackage={() => undefined}
onActivateVip={() => undefined}
/>,
);
expect(html).toContain('aria-labelledby="voice-unlock-options-title"');
expect(html).toContain("z-72");
expect(html).toContain("Unlock voice message");
expect(html).toContain("购买语音包");
expect(html).toContain("开通 VIP");
expect(html).toContain("免费10条语言消息+无限畅聊");
expect(html).toContain("Cancel");
expect(html).toContain("bg-[linear-gradient(90deg,#ff67e0_0%,#ff52a2_100%)]");
expect(html).toContain(
"bg-[linear-gradient(#ffffff,#ffffff)_padding-box,linear-gradient(90deg,#ff67e0,#ff52a2)_border-box]",
);
});
});