Skip to main content

Doctor E2E

Backend end-to-end test suite for the TimeCampus product. timecampus-doctor holds backend GraphQL E2E tests that exercise the TimeCampus workspace service through the public workspace gateway.

What is covered​

  • Module CRUDL suite

    • Time entries & timer (timeentry)
    • Projects & tasks (project)
    • Pomodoro sessions, settings & goals (pomodoro)
    • Meetings (meeting)
    • Expenses with approve/reject (expense)
    • Location entries & geofences (location)
    • Approval requests (approval)
    • Resource plans & allocations (resource)
    • Client portal configuration (client)
    • Work patterns, focus scores, app usage, email tracking
    • Channel configuration, workspace configuration, UI session state
    • Automatic capture timeline ingestion & assembly (timeline)
  • Story-level smoke suite

    • Time entries & the one-tap timer
    • Projects, tasks & budgets
    • Meeting cost & action items
    • Expense tracking & approval
    • Time approval workflow
    • Pomodoro focus sessions
    • Client portal transparency
    • Automatic capture timeline
    • Workspace configuration & UI session persistence

Prerequisites​

  • bash, curl, jq
  • A valid E2E environment

Target environments​

The suite defaults to production. Choose a target using TIMECAMPUS_TARGET:

TargetDefault endpointHow to select
localhttp://localhost:4003/workspaces/graphqlTIMECAMPUS_TARGET=local
alphahttps://alphagraphqlworkspaces.burdenoff.com/workspaces/graphqlTIMECAMPUS_TARGET=alpha
prod (default)https://graphqlworkspaces.burdenoff.com/workspaces/graphqlTIMECAMPUS_TARGET=prod or omit

Direct overrides (highest priority):

  • TIMECAMPUS_ENDPOINT — full GraphQL URL
  • E2E_WSPACE_PUBLIC_GATEWAY — workspace public gateway URL
  • E2E_GLOBAL_GATEWAY — global auth gateway URL (used for token refresh)

Running tests​

# Production (default) - requires prod auth token + workspace context
make test

# Local development
TIMECAMPUS_TARGET=local make test

# Alpha (behind Cloudflare Access)
TIMECAMPUS_TARGET=alpha \
E2E_CF_ACCESS_CLIENT_ID=<service-token-id> \
E2E_CF_ACCESS_CLIENT_SECRET=<service-token-secret> \
AUTH_TOKEN=<alpha-jwt> \
WORKSPACE_ID=<alpha-workspace-id> \
make test

# All backend CRUDL tests
make test-all

# Individual module suites
make test-timeentry
make test-project
make test-pomodoro
make test-meeting
make test-expense
make test-location
make test-approval
make test-resource
make test-client
make test-workpattern
make test-focusscore
make test-appusage
make test-emailtracking
make test-channel
make test-configuration
make test-uisession

Repo layout​

.
├── Makefile # Root test orchestration
├── README.md # This file
├── core/scripts/common.sh # Shared logging / GraphQL helpers
└── wspace/modules/timecampus/
├── Makefile # Per-suite targets
├── README.md # Module-level docs
└── scripts/
├── test-timecampus.sh # Full CRUDL suite
└── test-timecampus-story.sh # Story-level smoke suite

Notes​

  • No global/modules/timecampus/ tests existed in the source repo; the directory is kept empty with a .gitkeep.
  • The test scripts expect auth and workspace context (AUTH_TOKEN / E2E_AUTH_TOKEN, WORKSPACE_ID / E2E_WORKSPACE_ID) to be exported by the caller.
  • For local runs, source workspaces-doctor/core/env/e2e-env.sh first.
  • For alpha, set E2E_CF_ACCESS_CLIENT_ID and E2E_CF_ACCESS_CLIENT_SECRET to pass Cloudflare Access service-token headers.

Source​

Source at github.com/algoshred/timecampus-doctor.

Next steps​