Repository navigation
Conversation
init on a project whose config imports @e2e-dev/desktop said there was nothing to create, while it adds the web, mobile, and Electron engines a config imports: only engines with a scaffold preset were known. The build now records the desktop version too, and it counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nit adds for a config's imports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
🟢 e2e web: 95 passedAll 95 tests in 43 files
Tested by e2e 0.25.0 · 54.5s · web · run artifacts |
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 26 model calls · 142.2k tokens (93% cached) · $0.0061 All 34 tests in 5 files
Tested by e2e 0.25.0 · 1m 25s · web · run artifacts |
There was a problem hiding this comment.
2 issues found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/e2e/tests/unit/cli-init.test.ts">
<violation number="1" location="packages/e2e/tests/unit/cli-init.test.ts:561">
P2: This assertion does not verify the version-range contract: any string value would pass, even if the desktop engine or core were added at an incompatible range. Assert the expected ranges, as the neighboring engine test does.</violation>
</file>
<file name="packages/e2e/scripts/write-sibling-versions.ts">
<violation number="1" location="packages/e2e/scripts/write-sibling-versions.ts:20">
P2: This new snapshot entry makes the existing CLI init integration test fail because its exact-key assertion does not include `@e2e-dev/desktop`; update that expected list with the new sibling package.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| it('adds the desktop engine an existing config imports, which has no preset of its own', async () => { | ||
| writeFileSync(path.join(dir, 'e2e.config.ts'), "import { desktop } from '@e2e-dev/desktop';\nexport default { targets: [{ engine: desktop(), app: { bundleId: 'com.example.todos' } }] };\n"); | ||
| expect((await init(dir, { yes: true })).exitCode).toBe(0); | ||
| expect(JSON.parse(read('package.json')).devDependencies).toMatchObject({ '@e2e-dev/desktop': expect.any(String), '@e2e-dev/core': expect.any(String) }); |
There was a problem hiding this comment.
P2: This assertion does not verify the version-range contract: any string value would pass, even if the desktop engine or core were added at an incompatible range. Assert the expected ranges, as the neighboring engine test does.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/e2e/tests/unit/cli-init.test.ts, line 561:
<comment>This assertion does not verify the version-range contract: any string value would pass, even if the desktop engine or core were added at an incompatible range. Assert the expected ranges, as the neighboring engine test does.</comment>
<file context>
@@ -555,6 +555,12 @@ describe('e2e init', () => {
+ it('adds the desktop engine an existing config imports, which has no preset of its own', async () => {
+ writeFileSync(path.join(dir, 'e2e.config.ts'), "import { desktop } from '@e2e-dev/desktop';\nexport default { targets: [{ engine: desktop(), app: { bundleId: 'com.example.todos' } }] };\n");
+ expect((await init(dir, { yes: true })).exitCode).toBe(0);
+ expect(JSON.parse(read('package.json')).devDependencies).toMatchObject({ '@e2e-dev/desktop': expect.any(String), '@e2e-dev/core': expect.any(String) });
+ });
+
</file context>
| expect(JSON.parse(read('package.json')).devDependencies).toMatchObject({ '@e2e-dev/desktop': expect.any(String), '@e2e-dev/core': expect.any(String) }); | |
| expect(JSON.parse(read('package.json')).devDependencies).toMatchObject({ '@e2e-dev/desktop': '0.x', '@e2e-dev/core': '0.x' }); |
| '@e2e-dev/core': read('core').version, | ||
| '@e2e-dev/web': read('web').version, | ||
| '@e2e-dev/mobile': read('mobile').version, | ||
| '@e2e-dev/desktop': read('desktop').version, |
There was a problem hiding this comment.
P2: This new snapshot entry makes the existing CLI init integration test fail because its exact-key assertion does not include @e2e-dev/desktop; update that expected list with the new sibling package.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/e2e/scripts/write-sibling-versions.ts, line 20:
<comment>This new snapshot entry makes the existing CLI init integration test fail because its exact-key assertion does not include `@e2e-dev/desktop`; update that expected list with the new sibling package.</comment>
<file context>
@@ -16,6 +17,7 @@ const versions = {
'@e2e-dev/core': read('core').version,
'@e2e-dev/web': read('web').version,
'@e2e-dev/mobile': read('mobile').version,
+ '@e2e-dev/desktop': read('desktop').version,
'@e2e-dev/electron': read('electron').version,
};
</file context>
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 50 model calls · 365.0k tokens (84% cached) · $0.0229 All 20 tests in 1 file
Tested by e2e 0.25.0 · 5m 35s · android-emulator · run artifacts |
🟢 e2e android: 68 passed, 1 skippedAll 69 tests in 8 files
Tested by e2e 0.25.0 · 10m 3s · android-emulator · run artifacts |
🟢 e2e ios: 67 passed, 1 skippedAll 68 tests in 8 files
Tested by e2e 0.25.0 · 8m 19s · ios-simulator · run artifacts |
🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped25 agent steps · 12 replayed from cache · 67 model calls · 566.1k tokens (82% cached) · $0.0391
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped | 25 steps · 67 calls | 8m 45s | |
| 🟢 | act completes Login Form | 1 step | 37.8s |
| 🟢 | act completes Infinite Scroll List | 1 step | 42.6s |
| 🟢 | act completes Modal Flow | 1 step | 10.5s |
| 🟢 | act completes Bottom Tabs | 1 step | 8.5s |
| 🟢 | act completes Text Input Variations | 1 step | 13.8s |
| 🟢 | act completes Broken Accessibility | 2 steps · 8 calls | 35.2s |
| 🟢 | act completes Vision Only | 2 steps · 6 calls | 23.0s |
| act completes Gestures (1 failed attempt first) | 1 step · 9 calls | 31.7s | |
| 🟢 | act completes Async States | 1 step · 10 calls | 27.2s |
| 🟢 | act completes Debounced Search | 1 step · 1 call | 28.2s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 1 call | 24.0s |
| 🟢 | act completes Flattened Login | 2 steps · 16 calls | 1m 22s |
| 🟢 | act completes Sticky Chrome Target | 1 step | 14.0s |
| 🟢 | act completes WebView Accessibility | 1 step | 12.8s |
| 🟢 | act completes Permission Prompt | 1 step | 11.5s |
| 🟢 | act completes Photo Picker | 1 step · 2 calls | 28.0s |
| 🟢 | act completes Product Catalog | 1 step | 10.6s |
| 🟢 | act completes Error Recovery | 1 step | 9.6s |
| 🟢 | act completes Choice Controls | 1 step · 5 calls | 31.9s |
| 🟢 | act completes Stripe PaymentSheet | 1 step · 9 calls | 30.1s |
| 🟢 | act completes Apple Pay | 1 step | 11.7s |
| ⏭️ | act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there) |
Tested by e2e 0.25.0 · 9m 21s · ios-simulator · run artifacts
What
e2e initon a project whose existing config imports@e2e-dev/desktopadds@e2e-dev/desktopand@e2e-dev/coreto package.json, as it already does for the web, mobile, and Electron engines.Why
initknew only the engines that have a scaffold preset. The desktop engine has none, so for a config that imports it,initadded no engine to package.json, andnpm installthen left the config unable to load.How it works
packages/e2e/scripts/write-sibling-versions.tsrecords the@e2e-dev/desktopversion indist/cli/init/sibling-versions.jsonat build time, beside the other engines.importedDependenciesinpackages/e2e/src/cli/init/config-dependencies.tscounts@e2e-dev/desktopas an engine next to the presets' engines. An import of it adds the engine at the recorded range, and@e2e-dev/corewith it.docs/reference/cli.mdxlists the Electron and desktop engines among the packagesinitadds for a config's imports. The list named web and mobile only, though main already adds Electron.AGENTS.mdsays the desktop engine counts though it has no preset.Verified
Ran it locally: yes
Scratch project with its own git root, a package.json with
e2eonly, and ane2e.config.tsthat importsdesktopfrom@e2e-dev/desktop. I ranCI=1 e2e init --yes --skills none --mcp noneonce with main's build and once with this branch's:devDependenciesafterinit{ "e2e": "*" }{ "@e2e-dev/core": "^0.25.0", "@e2e-dev/desktop": "^0.0.1", "e2e": "*" }The new unit test in
cli-init.test.tsfails with main'sconfig-dependencies.tsand passes with this one.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
e2e initon an existing config now adds the desktop engine and its required core package topackage.jsonwhen they’re imported.Documentation
e2e initadds when checking an existing config.