test(e2e): extended user flow spec — terminals + close + session delete#113
Conversation
…delete Adds e2e/extended-user-flow.spec.ts which exercises the full UI path from cold start through session delete, including the terminal panel that the existing bun-start-simulation.spec.ts does not cover: 1. Cold start → home page 2. Click 打开项目 → modal 3. Navigate dir browser to F:\ProgramPlayground\JavaScript\Copilot-Switch 4. Project workspace loads 5. Create session (wait for state to leave 'creating') 6. Create 3 terminals via the + button 7. Close 1 terminal via the × on the second tab 8. Delete session via the close button + confirm modal Why this matters: prior e2e suite never created terminals, so the t() shadowing bug in TerminalManager (PR #112) reached v0.2.1 without test coverage. This spec would have caught it at the 'expected to render terminal panel' assertion. Note: TerminalManager does NOT auto-create a terminal when a session becomes active — the user must click '+'. The spec accounts for this. Verified locally: 1 passed (41.4s) on Node v24 + Electron 42 + Playwright 1.60.0 (the e2e fixture path that works in this environment).
There was a problem hiding this comment.
Code Review
This pull request introduces a new extended E2E test simulating a complete user flow: opening a project, creating a session, managing multiple terminals, and deleting the session. The review feedback highlights several critical improvements for test reliability and environment independence: replacing the hardcoded local Windows path with a dynamically created project directory using Playwright's dataDir, resolving platform compatibility issues, removing redundant or fragile hardcoded timeouts, and replacing manual polling loops with Playwright's native waitForFunction and explicit element waits.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
概述
新增
e2e/extended-user-flow.spec.ts,跑完整 UI 流程:冷启动 → 打开项目 → 创建 session → 创建 3 个 terminal → 关闭 1 个 → 删除 session。价值
之前的 e2e 套件(
bun-start-simulation.spec.ts)只到 "创建 session" 那一步——从来没跑过 terminal panel。结果是 PR #112 那个TerminalManager里t2 is not a function的 i18n 遮蔽 bug 没人发现,一直跟到 v0.2.1 release。这个 spec 专门补齐 terminal 路径,未来 TerminalManager / SessionTerminal 的回归会被立刻捕获。
流程
F:\ProgramPlayground\JavaScript\Copilot-Switch注意点
TerminalManager在activeSession存在时不自动建 terminal——用户必须手动点 "+"。Spec 反映了这一点。验证
属于 v0.2.2 之后的下个 release(v0.2.3 候选)。