Skip to content

test(desktop): fix flaky unassigned-project E2E #1923

Description

@Astro-Han

What happened

apps/desktop/e2e/project-management.spec.ts intermittently times out while waiting for the 未归属项目 group after creating and sending the first message in an unassigned session.

The assistant response is already visible when the test opens the sidebar and switches to project grouping, but no matching [data-project-id] appears within 10 seconds.

The same assertion has failed in unrelated CI runs:

Adjacent CI runs pass, and the focused test passed 20/20 repeated runs on current main.

How to reproduce

  1. Run the full desktop E2E suite on the Ubuntu CI runner with one worker.
  2. Observe project-management.spec.ts.
  3. Intermittently, the final assertion cannot find the unassigned project group even though the fake backend response is visible.

The failure has not reproduced in 20 focused local runs.

Environment

  • Maka commit: 5cb50df59
  • CI: GitHub-hosted ubuntu-latest
  • Node.js: 24
  • Surface: Desktop Electron E2E
  • Playwright workers: 1
  • Retries: 0

Expected fix

Identify which state boundary has not settled before the final assertion and synchronize the test with that authoritative state. Do not hide the failure with retries or a longer timeout.

Verification should include repeated focused runs and the full desktop E2E suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions