Conversation
- feat: Tier 2 Playwright suite in e2e-remote/ covering login, logout, project CRUD
- feat: e2e-remote.yml CI workflow runs Tier 2 on every push/PR to main
- feat: both E2E tiers redirect Electron userData to a temp dir via ELECTRON_USERDATA so the real store is never touched
- fix: ipcHandlers imported dynamically so app.setPath('userData') takes effect before electron-store is constructed
- fix: settingsStore no longer shows error toast when settings key is absent (first launch / empty test store)
- feat: default urlRemoteServer and urlVisualizer pre-filled in createDefaultSettings()
- refactor: clearCanvas and waitForToasts extracted to e2e/helpers.ts and e2e-remote/helpers.ts
- fix: replace recursive submodule checkout (fails on private repos) with ssh-agent + targeted submodule init for coral-remote-server only
…ubmodule coral-remote-server
mfranzon
approved these changes
Jul 10, 2026
- refactor: authedPage now logs in fresh per test instead of caching a JWT in electronApp; keeps fixtures self-contained and more readable, with no shared state between fixtures - refactor: rename remotePage to unauthedPage for symmetry with authedPage - docs: add a README section explaining ELECTRON_USERDATA store isolation and why ipcHandlers is imported dynamically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It completes Tier 2 from #193
Overview
Adds a Tier 2 Playwright E2E test suite that verifies the interaction between the DealiiX Platform Electron client and
coral-remote-server— a Go REST API that provides project sharing and multi-user authentication for the platform. Tests cover authentication flows and project persistence: creating, renaming, deleting, and loading projects back onto the canvas.The suite runs against a real
coral-remote-serverinstance started via Docker Compose reusing the existingdocker-compose.yml. Everything runs in a separate CI workflow (e2e-remote.yml) rather than alongside Tier 1 inci.yml— primarily because building Docker images adds significant overhead in terms of time, especially in future Tier 3.The workflow checks out the
coral-remote-serversubmodule — a private repository — using a read-only SSH deploy key stored as theCORAL_REMOTE_SERVER_DEPLOY_KEYActions secret.The PR also introduces isolated electron-store handling for both test tiers (including Tier 1 PR #200) so the developer's real settings and registered nodes are never touched during test runs.
This works because both tiers launch Electron with
ELECTRON_USERDATAset to a fresh temp directory (e2e/fixtures.tsande2e-remote/fixtures.ts), andelectron/main.tscallsapp.setPath('userData', process.env.ELECTRON_USERDATA)beforeipcHandlersis ever imported. That ordering only holds becauseipcHandlersis imported dynamically insideapp.whenReady()instead of statically at the top of the file — a static import would be hoisted by ESM and evaluated first, beforeapp.setPathruns.ipcHandlerspulls in theelectron-storesingleton viastorage.ts, which readsapp.getPath('userData')the moment it's constructed, so a static import would permanently lock the store onto the wrong data directory.Summary
e2e-remote/— login, logout, project create/rename/delete/loade2e-remote.ymlCI workflow runs Tier 2 on every push/PR tomain; uses a deploy key to check out only thecoral-remote-serversubmodule (other private submodules are not needed)authedPagefixture logs in fresh for every test and keeps the fixtures self-contained;remotePagerenamed tounauthedPagefor symmetry withauthedPageuserDatato a temp dir viaELECTRON_USERDATAso the developer's real settings and registered nodes are never touched during test runsipcHandlersnow imported dynamically insideapp.whenReady()soapp.setPath('userData', …)takes effect beforeelectron-storeis constructed (static ESM imports were hoisted, defeating the redirect)settingsStoreno longer shows an error toast when thesettingskey is absent — absent key (first launch / empty test store) silently falls back tocreateDefaultSettings(); toast fires only when the key exists but fails schema validationurlRemoteServer(http://localhost:8080) andurlVisualizer(http://localhost:8008) pre-filled as defaults increateDefaultSettings()clearCanvasandwaitForToastsextracted from inline fixture code intoe2e/helpers.tsande2e-remote/helpers.tsTest plan
docker compose up -d coral-remote-servernpm run test:e2e:remote:build— all 7 Tier 2 tests passnpm run test:e2e:build— all Tier 1 tests still passbackendKind: executable, then runnpm run test:e2e:build— Tier 1 still passes (isolated store, not affected by real settings)urlRemoteServerandurlVisualizerare pre-filled in Settings on first launch