setup flow e2e test (#2028)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Adds a new IPC entrypoint and changes Node.js status resolution logic
(even though gated to `E2E_TEST_BUILD`), which could affect runtime
behavior if the flag/channel is misused. The rest is E2E-only test
additions/refactors.
>
> **Overview**
> Adds Playwright E2E coverage for the initial *Setup Dyad* flow,
including Node.js install UX states, provider setup navigation, and
verifying the setup banner disappears after configuring an AI provider.
>
> Introduces a **test-only IPC** (`test:set-node-mock`) to
deterministically mock Node.js installed/not-installed status in E2E
builds, with a new `PageObject.setNodeMock()` helper and preload
allowlisting. Refactors Node.js status handling to centralize Node
download URL selection via `getNodeDownloadUrl()`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5dd01b9e95375ff4a39d00b9ec9ecb40685d89a0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds Playwright E2E coverage for the setup flow and a test-only IPC to
mock Node.js install status, making the flow fully testable and
deterministic. Also refactors Node download URL selection for clarity.
- **New Features**
- Added setup_flow.spec.ts to verify:
- Banner states when Node is installed.
- Node install flow with “Continue… I installed Node.js”.
- AI provider navigation and banner dismissal after configuration.
- Introduced test-only IPC channel test:set-node-mock (allowlisted in
preload) gated by E2E_TEST_BUILD=true; added PageObject.setNodeMock()
helper.
- Refactored node_handlers to use getNodeDownloadUrl() and return mocked
versions when enabled.
- **Migration**
- Run E2E with E2E_TEST_BUILD=true to enable the mock IPC.
<sup>Written for commit 5dd01b9e95375ff4a39d00b9ec9ecb40685d89a0.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2028">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
正在显示
e2e-tests/setup_flow.spec.ts
0 → 100644
请
注册
或者
登录
后发表评论