# Phase 6D manual test script: run the airplane-mode proof yourself

About 10 minutes, on the XAMPP computer. Steps A to C are once only.

## A. Once only

1. [ ] In phpMyAdmin (or the MariaDB console), create the test database:

   ```sql
   CREATE DATABASE church_acct_e2e;
   ```

2. [ ] In Git Bash, in `C:\xampp\htdocs\church_acct_app`, install the test browser (about 90 MB):

   ```bash
   npx playwright install chromium
   ```

## B. The safety catch

3. [ ] Check the helper refuses your real books:

   ```bash
   php artisan tobas:e2e inspect
   ```

   It answers: Refused: this helper only works on a database named *_e2e (this one is "church_acct").

## C. Run the proof

4. [ ] Build the app, then run the tests:

   ```bash
   npm run build
   ```

   ```bash
   npm run e2e
   ```

   About 2 minutes. It prints four lines with "ok" and "4 passed":
   - two devices record a Sunday with no connection, and nothing is lost or recorded twice;
   - an entry for a month closed meanwhile goes to Sync issues, not lost and not posted;
   - several devices pushing at the same moment still get unique, gap-free numbers;
   - a revoked device clears itself at its next connection.
5. [ ] Your local site is untouched. Open the website as usual: the demo church's giving, petty cash and
   devices are as you left them. The tests used only `church_acct_e2e`.

## D. Read the evidence and the guide

6. [ ] Read `docs/phases/phase-6-exit-evidence.md`: what was proved, by which test, and the known limits.
7. [ ] Read `docs/pilot/OFFLINE-GUIDE.md` as a branch treasurer would. Is anything unclear for your staff?

## If a test fails

Playwright keeps a trace in `test-results\…\trace.zip`. Open it with:

```bash
npx playwright show-trace test-results/<folder>/trace.zip
```

It shows every step with screenshots and network calls.
