> For the complete documentation index, see [llms.txt](https://klassdocs.gitbook.io/klassapp-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klassdocs.gitbook.io/klassapp-documentation/e2e.md).

# KlassApp E2E Test Suite

## Files

```
e2e/
  prod-uganda-onboarding.spec.js   — legacy: single Uganda signup+onboarding flow
  signup-onboarding.spec.js        — legacy: local signup + Toshi flow
  global-setup.js                  — Playwright global setup (seeds local DB)
  manual-selfserve-onboarding.spec.js — NEW: self-serve /register → manual admin onboarding
  toshi-onboarding.spec.js           — NEW: SSH-created school → Toshi chat onboarding
  onboarding-parity.spec.js           — NEW: compares the two journey JSON summaries
  support/
    dummy-data.js        — generates run-unique TEST-E2E- prefixed data
    otp.js               — OTP retrieval (ssh strategy queries authentications table)
    journey-summary.js   — writes/reads JSON summaries for parity comparison
    report-generation.js — downloads report card PDF
```

## Running

All against production:

```
PLAYWRIGHT_BASE_URL=https://klassapp.xyz npx playwright test --project=selfserve
PLAYWRIGHT_BASE_URL=https://klassapp.xyz npx playwright test --project=toshi
PLAYWRIGHT_BASE_URL=https://klassapp.xyz npx playwright test --project=parity
```

Or run all three (selfserve + toshi first, then parity):

```
PLAYWRIGHT_BASE_URL=https://klassapp.xyz npx playwright test --project=selfserve --project=toshi --project=parity
```

Requirements:

* SSH key at `~/.ssh/id_ed25519_do` (or set `KLASSAPP_SSH_KEY`)
* SSH host: the retired droplet. The address is in the private repo KlassApp-Foundation/internal or the Cloud dashboard (or set `KLASSAPP_SSH_HOST`)
* OTP: SSH strategy queries the `authentications` table directly

## Naming convention

All entities use `TEST-E2E-` prefix for schools and `@klassapp.test` emails. Each run cleans up after itself via SSH delete.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://klassdocs.gitbook.io/klassapp-documentation/e2e.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
