Skip to content

test(e2e): extended user flow spec — terminals + close + session delete#113

Merged
ACCSCI merged 1 commit into
masterfrom
test/extended-user-flow
Jul 2, 2026
Merged

test(e2e): extended user flow spec — terminals + close + session delete#113
ACCSCI merged 1 commit into
masterfrom
test/extended-user-flow

Conversation

@ACCSCI

@ACCSCI ACCSCI commented Jul 2, 2026

Copy link
Copy Markdown
Owner

概述

新增 e2e/extended-user-flow.spec.ts,跑完整 UI 流程:冷启动 → 打开项目 → 创建 session → 创建 3 个 terminal → 关闭 1 个 → 删除 session。

价值

之前的 e2e 套件(bun-start-simulation.spec.ts)只到 "创建 session" 那一步——从来没跑过 terminal panel。结果是 PR #112 那个 TerminalManagert2 is not a function 的 i18n 遮蔽 bug 没人发现,一直跟到 v0.2.1 release。

这个 spec 专门补齐 terminal 路径,未来 TerminalManager / SessionTerminal 的回归会被立刻捕获。

流程

  1. 冷启动 → home page 按钮可见
  2. 点击 "打开项目" → modal
  3. 在 dir browser 钻目录到 F:\ProgramPlayground\JavaScript\Copilot-Switch
  4. 项目工作区加载(h2 显示 "Copilot-Switch")
  5. 点 + 创建 session,等状态从 creating 转 active
  6. 点 + × 3 创建 3 个 terminal
  7. 点第二个 tab 的 × 关闭 1 个
  8. 点 session 关闭按钮 + 确认 modal 删除 session

注意点

TerminalManageractiveSession 存在时自动建 terminal——用户必须手动点 "+"。Spec 反映了这一点。

验证

  • 本地跑通(41.4s)
  • CI 跑通(这个 spec 跟 e2e 套件一起,会被 Playwright runner 自动调度)

属于 v0.2.2 之后的下个 release(v0.2.3 候选)。

…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).
Copilot AI review requested due to automatic review settings July 2, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread e2e/extended-user-flow.spec.ts
Comment thread e2e/extended-user-flow.spec.ts
Comment thread e2e/extended-user-flow.spec.ts
Comment thread e2e/extended-user-flow.spec.ts
@ACCSCI ACCSCI merged commit db17ba8 into master Jul 2, 2026
1 check passed
@ACCSCI ACCSCI deleted the test/extended-user-flow branch July 2, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants