Orbit

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 test

This 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

AreaExamples
AccountsSign-up, login, lockout after repeated failures, reset links, password change, account deletion
CustomersCreate, edit, delete, search, filters, sorting, paging, notes, CSV import and export
AnalyticsEvent collection, source detection, date ranges, saved views, public share links
TeamsInvites, roles, switching workspaces, notifications, alerts
BillingPlan limits, upgrades and downgrades, Stripe webhook signatures, invoices
APIKeys, scopes, every public endpoint, revocation
AIBoth engines, request contents, prompt-injection defences, fallback
AdminAccess control, impersonation and its audit trail
PagesMarketing, blog, RSS, sitemap, languages, legal pages
InterfaceReal-browser flows and a no-horizontal-scroll check at four screen widths
IsolationEvery feature is checked from a second workspace to confirm nothing leaks

Browser tests

npm run build
npm run test:ui

These 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.