Use a dedicated acceptance installation from bash scripts/install.sh (empty database for first-run cases). bash scripts/dev.sh is also supported for ordinary regressions, but provisions its administrator before the browser runs. In another terminal:
cd e2e
npm ci
npx playwright install chromium
npx playwright test --config public/playwright.config.mjsFor a container installation, create acceptance accounts in the browser and supply their usernames and protected password-file paths using the variables below. The .local/admin-password fallback is only generated by scripts/dev.sh; the container installer never creates a default administrator or password. First-run cases can create both accounts instead, using the supplied test passwords.
The suite signs in through the real password form, checks preferences and editor/user-text boundaries, and executes the welcome workflow through artifacts, human approval and completion. It uses the real MySQL and platform process. Its default cases require no model key and make no GitHub writes.
Set LOOPFORGE_TEST_URL, LOOPFORGE_TEST_USER and LOOPFORGE_TEST_PASSWORD (or the protected LOOPFORGE_TEST_PASSWORD_FILE) to test another explicit acceptance installation. The welcome project/catalog must be installed. Screenshots and traces are saved under e2e/test-results/public/.
The broader upstream API/UI suites remain under api/ and ui/. They use AGENTFLOW_E2E_BASE and AGENTFLOW_E2E_TOKEN. Their public defaults target localhost, local sandboxes, and disable paid model scenarios. Live knowledge/model/integration cases require operator configuration and report skips when unavailable.
00-first-run.spec.mjs covers what a brand-new user sees and only runs with LOOPFORGE_FRESH_INSTALL=1 against an installation that has no accounts yet (for example right after bash scripts/install.sh). It creates the administrator through the browser using LOOPFORGE_TEST_USER/LOOPFORGE_TEST_PASSWORD, checks the onboarding checklist and missing-key notice, and signs up LOOPFORGE_UNCONFIGURED_USER as a regular user, so the remaining specs can run immediately afterwards.
The home composer regression uses a separate account with no model credentials. Create it with the first-run spec or loopforge-account, then set LOOPFORGE_UNCONFIGURED_USER and either LOOPFORGE_UNCONFIGURED_PASSWORD or LOOPFORGE_UNCONFIGURED_PASSWORD_FILE. It proves drafts stay editable before setup, a settings link focuses the key field, saving a credential enables sending without a reload, and returning to the workbench preserves the draft. It never calls a model with the inert credential used for this state transition. CI provisions this account explicitly.
Set AGENTFLOW_E2E_MODEL=1 to enable the real home-chat test. Configure the signed-in account's real model key in personal settings first. The test checks a real reply, completion, server-side conversation persistence and reload, then deletes its conversation. Credential-related composer tests disable traces and screenshots.
welcome.spec.mjs checks the compact home screen at desktop, laptop, 390 px English/dark and 320 px mobile sizes. It verifies that all five checklist rows are always expanded, GitHub is optional and excluded from the four-step progress count, every row and the composer are reachable by scrolling, and dismissal and draft editing work, and starts a real no-key demo from the checklist through UI approval and completion. It also checks the capability question’s missing-key setup path, preservation of existing drafts, and repository registration without a GitHub token, including checkbox alignment and the direct credential link. The repository tests reuse a dedicated e2e-onboarding project owned by the unconfigured test user (projects have no delete endpoint), restore its settings and remove their temporary repositories. With AGENTFLOW_E2E_MODEL=1, an additional case sends the capability question through the real model and removes its saved conversation. Use the same unconfigured account as the composer test and ensure it is a member of the welcome project; browser self-registration does this automatically. Only credential-free home screenshots are saved.
For a complete clean container installation, run bash scripts/test-container.sh from the repository root; see deployment.
references.spec.mjs exercises the real @ reference menu at desktop, laptop, a short viewport and English/dark mobile sizes. It checks viewport clipping, workbench scrolling, searchable/selectable SOP references, toolbar entry, resize behavior, sticky search and Escape. It uses the same unconfigured account joined to welcome, makes no model calls and creates no platform or GitHub resources.
without-github.spec.mjs runs a real script/approval SOP with no model key, repository or Git token and checks that built-in code delivery still rejects a missing repository. With AGENTFLOW_E2E_MODEL=1 and a protected LOOPFORGE_MODEL_KEY_FILE, it temporarily configures only a model key on the dedicated unconfigured account, creates a real document-generating Agent/SOP, verifies the artifact and removes the run/definitions and key. Set LOOPFORGE_MODEL_KEY_ENVIRONMENT to match the key’s provider environment; no GitHub credential is added. It reuses the e2e-onboarding fixture project, which must have no repositories.
Non-authentication journeys share one real password session per worker in memory to respect the production login rate limit. Password-form and credential regressions remain separate; cookies are not written to reports.
executors.spec.mjs checks independent CodeBuddy/Codex/Claude selection, provider-specific models, custom model IDs, credential-field navigation, missing-key API denial, choice persistence and per-role SOP readiness. It also keeps model/approval menus inside a short desktop window and a narrow mobile viewport after dismissing onboarding. It uses only inert credentials for UI checks; no paid Codex or Claude call is implied.
For a real Chromium check of archived preview navigation, run AGENTFLOW_E2E_PREVIEW_BROWSER=1 AGENTFLOW_E2E_MODEL=1 node --test e2e/api/56-sandbox-preview.test.mjs from the repository root with the API suite's deployment/token variables. Install Chromium first. The preview case uses a real CodeBuddy build and checks SPA navigation, reload, full-page navigation and Back under the preview session path. It cleans up its run and preview.
Real installed Codex/Claude protocol tests use local fixture gateways and HTTP MCP, including native-tool restrictions and actor credentials:
npm install --global @openai/codex@0.162.1 @anthropic-ai/claude-code@2.1.300
AGENTFLOW_TEST_NATIVE_PROVIDERS=1 go test ./internal/httpapi ./internal/runtime \
-run 'TestAssistantNativeProviderGateway|TestNativeProviderCustomGateway' -count=1 -vRun this from the repository root with Node.js 22+. It sends no request to a paid model service. The CI platform job runs the same pinned CLIs.