# Phase 5D manual test script: auditor mode

For the HQ Administrator, the demo auditor and a branch treasurer. About 20 minutes. The rules are also
proved by `tests/Feature/AuditorModeTest.php`:
- branches and dates limited;
- an ended engagement keeps the auditor out;
- downloads marked;
- queries answered and closed.

`tests/Feature/DirectsProofTest.php` rehearses the whole of Phase 5.

**Logins (demo church):**
- **admin@demo.church.test**: with the password you set on 18 Oct;
- **auditor@demo.church.test**: the seed password, no two-factor;
- a Lekki treasurer: make one under Users & roles if needed.

## A. Engagement

1. [ ] As the administrator, **Headquarters (Directs) › Auditors**. The demo auditor shows "No engagement
   set: this auditor can see every branch with no end date".
2. [ ] **Set engagement**:
   - tick Lekki only;
   - books from 1 January to 31 December this year;
   - access until next month;
   - a note.

   Save: the auditor is signed out.
3. [ ] As the auditor, Journals lists only Lekki's journals of this year. Opening a Headquarters journal's
   address gives "Not found". Reports run for any dates show only this year's. Directs is "Not found".
4. [ ] Download any report as **PDF**: "Auditor copy · name · date" runs across every page. Download as
   **Excel**: the first row says AUDITOR COPY.
5. [ ] As the administrator, **Activity** for the auditor lists the pages they opened and the files they
   downloaded.

## B. Queries

6. [ ] As the auditor, open a Lekki journal and press **Raise an audit query**. The form opens with the
   journal filled in. Ask a question and send it.
7. [ ] As the Lekki treasurer, the dashboard shows "1 question(s) from the auditor to answer". Answer it on
   **Audit queries**, attaching a PDF.
8. [ ] As the auditor, open the attachment, **Ask a follow-up**; the treasurer answers again; the auditor
   **Closes** it.

## C. End

9. [ ] As the administrator, **End now** on the engagement. The auditor is signed out and signing in again
   says the audit access has ended.
10. [ ] (Optional) Set an engagement for "every branch" again so the demo auditor works as before.

## Sign-off

| Section | Checked by | Date | Notes |
|---|---|---|---|
| A Engagement | | | |
| B Queries | | | |
| C End | | | |
