| .. | ||
| deck-boards.json | ||
| deck-week.json | ||
| load-month-multiuser.json | ||
| load-month-offset-1.json | ||
| load-month-offset-2-trend.json | ||
| load-month-offset-2.json | ||
| load-month-offset-3-trend.json | ||
| load-month-offset-3.json | ||
| load-month-offset-4-trend.json | ||
| load-month-offset-4.json | ||
| load-month-offset1.json | ||
| load-month-offset2-trend.json | ||
| load-month-offset2.json | ||
| load-month-offset3-trend.json | ||
| load-month-offset3.json | ||
| load-month-offset4-trend.json | ||
| load-month-offset4.json | ||
| load-month-qa.json | ||
| load-month.json | ||
| load-week-offset-1.json | ||
| load-week-offset-2-trend.json | ||
| load-week-offset-2.json | ||
| load-week-offset-3-trend.json | ||
| load-week-offset-3.json | ||
| load-week-offset-4-trend.json | ||
| load-week-offset-4.json | ||
| load-week-offset1.json | ||
| load-week-offset2-trend.json | ||
| load-week-offset2.json | ||
| load-week-offset3-trend.json | ||
| load-week-offset3.json | ||
| load-week-offset4-trend.json | ||
| load-week-offset4.json | ||
| load-week-qa.json | ||
| load-week.json | ||
| notes-month-qa.json | ||
| notes-month.json | ||
| notes-week-offset1.json | ||
| notes-week.json | ||
| onboarding-export.json | ||
| persist-qa.json | ||
| persist-reporting-deck.json | ||
| persist-response.json | ||
| persist-week-offset1.json | ||
| preset-export.json | ||
| README.md | ||
Test Fixtures
Store anonymised payloads from a real Nextcloud instance here so integration
tests can replay realistic /overview responses without hitting the server.
Capture Checklist
- Start your local/staging Nextcloud with Opsdash enabled and seeded with representative calendars/targets.
- Grab request token from the web UI (or run within the NC container where
OCS-APIREQUESTis sufficient). - Load payloads
Repeat withcurl -sS -u admin:admin \ -H "OCS-APIREQUEST: true" \ -H "requesttoken: <token>" \ "http://localhost:8088/index.php/apps/opsdash/overview/load?range=week&offset=0" \ > test/fixtures/load-week.json curl -sS -u admin:admin \ -H "OCS-APIREQUEST: true" \ -H "requesttoken: <token>" \ "http://localhost:8088/index.php/apps/opsdash/overview/load?range=month&offset=0" \ > test/fixtures/load-month.jsonoffset=-4..4to cover navigation and forecast edge-cases. - Persist response
- In the UI, adjust selections/targets and capture the POST body (e.g. via DevTools) or manually craft one.
- Send it to
/overview/persist, saving the response:curl -sS -u admin:admin \ -H "OCS-APIREQUEST: true" \ -H "requesttoken: <token>" \ -H "Content-Type: application/json" \ -d @test/fixtures/persist-request.json \ "http://localhost:8088/index.php/apps/opsdash/overview/persist" \ > test/fixtures/persist-response.json
- Anonymise IDs/names if needed (
cal-1,Focus Week, …) before committing. - Ensure files stay small; trim arrays if the full payload is huge (keep the structure intact).
Integration suites can now import these fixtures directly, e.g.:
import loadWeek from '../fixtures/load-week.json'
- Added offset fixtures (week/month) to cover previous/next periods.
load-week-offset-1.json(offset -1)load-month-offset1.json(offset +1)load-week-offset2.json(offset +2 with multiple calendars selected)load-month-multiuser.json(month view with multiple calendars)preset-export.json(Config & Setup export envelope)onboarding-export.json(Config & Setup export including onboarding snapshot)persist-response.json(sanitised/overview/persistresponse)persist-reporting-deck.json(persist payload exercising reporting + Deck settings)notes-week.json(GET/overview/notessample; also used for/overview/persistminimal fixture)load-month-qa.json(Month view payload seeded via QA user)notes-month-qa.json(QA user month note payload captured after rerunning onboarding)load-week-qa.json(QA user week payload with independent calendar selection)notes-week-offset1.json(Previous week notes capture)persist-week-offset1.json(Persist response for previous-week scenario)notes-week-offset1.json(Previous week notes payload)persist-week-offset1.json(Persist response fixture for previous-week scenario)