conversation-session-v4-delete.test.ts 1021 B

1234567891011121314151617181920212223242526272829303132
  1. // 通过侧栏现有入口操作,验证真实标题投影或归档后的永久删除。
  2. import { clearAppData } from "#e2e/helpers/desktop-app";
  3. import {
  4. clickV4DeleteSession,
  5. prepareV4ConversationE2E,
  6. sendV4Prompt,
  7. waitForV4Pane,
  8. waitForV4TimelineContaining,
  9. } from "#e2e/helpers/v4-conversation";
  10. describe("v4 M4 门禁:deleteSession", () => {
  11. after(async () => {
  12. await browser.electron.restoreAllMocks();
  13. await clearAppData();
  14. });
  15. it("建立 session → 删除 → pane 回到 draft", async () => {
  16. await prepareV4ConversationE2E();
  17. await sendV4Prompt("E2E_V4_DELETE_SEED 建立会话");
  18. await waitForV4TimelineContaining("V4_DELETE_SEED_OK", 45000);
  19. await waitForV4Pane(
  20. (s) => s.sessionId !== "draft" && s.sessionId !== null,
  21. "会话没有建立",
  22. 45000,
  23. );
  24. // 删除会话 → pane 回到 draft
  25. await clickV4DeleteSession();
  26. await waitForV4Pane((s) => s.sessionId === "draft", "删除后 pane 没有回到 draft", 30000);
  27. });
  28. });