Testing
The automated tests that come with Orbit and how to run them.
Orbit ships with an end-to-end suite that starts the real production server on a throwaway database and exercises the API and pages.
Run it
npm testThis builds the app, starts it on a spare port with a temporary embedded database, runs every test file and shuts everything down. Your own data is never touched.
What is covered
| Area | Examples |
|---|---|
| Accounts | Sign-up, login, lockout after repeated failures, reset links, password change, account deletion |
| Customers | Create, edit, delete, search, filters, sorting, paging, notes, CSV import and export |
| Analytics | Event collection, source detection, date ranges, saved views, public share links |
| Teams | Invites, roles, switching workspaces, notifications, alerts |
| Billing | Plan limits, upgrades and downgrades, Stripe webhook signatures, invoices |
| API | Keys, scopes, every public endpoint, revocation |
| AI | Both engines, request contents, prompt-injection defences, fallback |
| Admin | Access control, impersonation and its audit trail |
| Pages | Marketing, blog, RSS, sitemap, languages, legal pages |
| Interface | Real-browser flows and a no-horizontal-scroll check at four screen widths |
| Isolation | Every feature is checked from a second workspace to confirm nothing leaks |
Browser tests
npm run build
npm run test:uiThese use Playwright to drive a real browser through the interface: signing up and logging in, the customer table and its dialogs, undo on delete, the command palette, keyboard shortcuts, themes, languages, the billing screen and the mobile menu. They also load every page at 360, 390, 768 and 1280 pixels wide and fail if anything scrolls sideways.
Locally they use the Google Chrome you already have installed. In CI, Playwright installs its own browser. Each test pretends to be a different visitor, so the sign-up rate limit never gets in the way.
Continuous integration
.github/workflows/ci.yml runs lint, the build, the end-to-end suite and the browser tests on every push.