Skip to content

Comments

e2e: full flow with simulated externals (sign in → create project → editor)#99

Merged
manuelkiessling merged 9 commits intomainfrom
chore/e2e-chat
Feb 17, 2026
Merged

e2e: full flow with simulated externals (sign in → create project → editor)#99
manuelkiessling merged 9 commits intomainfrom
chore/e2e-chat

Conversation

@manuelkiessling
Copy link
Member

Summary

Adds a full end-to-end test that covers the core flow (sign in → create project → use editor) with all external dependencies simulated. The test is deterministic and requires no real APIs, git remotes, or GitHub access.

What’s in scope

  • Project creation checks: LLM key (already simulated via LLM_CONTENT_EDITOR_SIMULATE), manifest URL, and S3 credentials are validated by test doubles that accept valid-looking input without calling external services.
  • Project source: Instead of cloning a real repo, the test uses a SimulatedGitAdapter that “clones” from a local fixture (tests/fixtures/e2e-workspace-template) and does a no-op on push.
  • Chat/editor: Commits and PRs are handled by SimulatedGitHubAdapter (constant fake PR URL) and simulated push; no real git push or GitHub API calls.
  • Workspace setup: In test env, setup steps are replaced by E2eNoOpProjectSetupStepsProvider (single true step) so setup finishes quickly without npm/mise.

Changes

  • Test doubles (active only when APP_ENV=test):

    • SimulatedRemoteManifestValidator – accepts any non-empty http(s) manifest URL.
    • SimulatedS3AssetUploaderverifyCredentials() returns true; upload() returns a deterministic fake URL.
    • SimulatedGitAdapter – clone copies fixture + git init + one commit; push is no-op; other operations delegate to real git.
    • SimulatedGitHubAdapterfindPullRequestForBranch() returns null; createPullRequest() returns a constant fake PR URL.
    • E2eNoOpProjectSetupStepsProvider – single no-op setup step so workspace setup completes without running npm/mise.
  • Config: when@test in config/services.yaml wires the above; e2e.workspace_fixture_path points at the fixture. docker-compose.e2e.yml sets APP_ENV: test for the messenger service so async workspace setup uses the same doubles.

  • E2E fixture: tests/fixtures/e2e-workspace-template/ with minimal package.json and index.html for the simulated “clone”.

  • E2E selectors: data-test-id / data-test-class added to project list, project form, editor, and workspace setup templates for stable selectors.

  • New spec: tests/End2End/tests/full-flow.spec.ts – one test that signs in, creates a project (with fake data), opens the editor, waits for setup when needed, and sends one message.

How to run

mise run tests:e2e

Runs the full Playwright suite (including the new full-flow test) against the stack started with docker-compose -f docker-compose.yml -f docker-compose.e2e.yml.

Notes

  • No production code paths are changed; simulations are only active when APP_ENV=test.
  • Prefab projects created for the e2e user are allowed; the test asserts at least one project list item after create.

@manuelkiessling manuelkiessling self-assigned this Feb 16, 2026
@manuelkiessling manuelkiessling added the enhancement New feature or request label Feb 16, 2026
…ditor)

- Add test doubles for APP_ENV=test: SimulatedRemoteManifestValidator,
  SimulatedS3AssetUploader, SimulatedGitAdapter (clone from fixture, no-op push),
  SimulatedGitHubAdapter (fake PR URL), E2eNoOpProjectSetupStepsProvider
- Wire doubles in config/services.yaml when@test; e2e fixture path parameter
- E2E fixture: tests/fixtures/e2e-workspace-template (minimal package.json + index.html)
- Set APP_ENV=test for messenger in docker-compose.e2e.yml so async setup uses doubles
- Add data-test-id / data-test-class to project list, project form, editor, workspace setup
- New e2e spec: full-flow.spec.ts (sign in, create project, open editor, send message)
- No external calls in e2e: LLM, manifest URL, S3, git clone, GitHub API all simulated
The e2e script mutates running containers in-place with test env config
but never restores them. This leaves nginx on port 8080 with APP_ENV=test
after tests complete. Add an EXIT trap that runs `docker compose up -d`
(without the e2e override) to recreate containers with dev defaults.
@manuelkiessling manuelkiessling marked this pull request as ready for review February 17, 2026 12:01
@manuelkiessling manuelkiessling merged commit 54a5a8b into main Feb 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant