opsdash-app/opsdash/test/fixtures
2026-02-22 08:55:01 +07:00
..
deck-boards.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
deck-week.json Add Deck summary card and seeding tooling 2025-11-24 13:15:08 +07:00
load-month-multiuser.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-month-offset-1.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-month-offset-2-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-month-offset-2.json Refactor opsdash load flow and services 2026-01-13 12:26:48 +07:00
load-month-offset-3-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-month-offset-3.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-month-offset-4-trend.json Refactor opsdash load flow and services 2026-01-13 12:26:48 +07:00
load-month-offset-4.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-month-offset1.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-month-offset2-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-month-offset2.json Add offset fixtures for load tests 2025-11-24 16:41:24 +07:00
load-month-offset3-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-month-offset3.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-month-offset4-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-month-offset4.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-month-qa.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-month.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-week-offset-1.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-week-offset-2-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset-2.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset-3-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset-3.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-week-offset-4-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset-4.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-week-offset1.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-week-offset2-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset2.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-week-offset3-trend.json Refactor opsdash load flow and services 2026-01-13 12:26:48 +07:00
load-week-offset3.json Add offset fixtures for load tests 2025-11-24 16:41:24 +07:00
load-week-offset4-trend.json Improve widget sizing controls and persistence 2025-12-21 10:50:07 +07:00
load-week-offset4.json Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
load-week-qa.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
load-week.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
notes-month-qa.json Remove balance insights config and clean up toggles 2025-11-23 15:13:44 +07:00
notes-month.json Remove balance insights config and clean up toggles 2025-11-23 15:13:44 +07:00
notes-week-offset1.json Remove balance insights config and clean up toggles 2025-11-23 15:13:44 +07:00
notes-week.json Improve notes history and layout loading 2025-12-25 16:01:52 +07:00
onboarding-export.json Bump release version to 0.6.0 2026-02-22 08:55:01 +07:00
persist-qa.json Remove balance insights config and clean up toggles 2025-11-23 15:13:44 +07:00
persist-reporting-deck.json Add Deck summary card and seeding tooling 2025-11-24 13:15:08 +07:00
persist-response.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
persist-week-offset1.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
preset-export.json fixtures: drop precision fields from balance config 2025-11-23 19:33:35 +07:00
README.md Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00

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

  1. Start your local/staging Nextcloud with Opsdash enabled and seeded with representative calendars/targets.
  2. Grab request token from the web UI (or run within the NC container where OCS-APIREQUEST is sufficient).
  3. Load payloads
    curl -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.json
    
    Repeat with offset=-4..4 to cover navigation and forecast edge-cases.
  4. 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
      
  5. Anonymise IDs/names if needed (cal-1, Focus Week, …) before committing.
  6. 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/persist response)
  • persist-reporting-deck.json (persist payload exercising reporting + Deck settings)
  • notes-week.json (GET /overview/notes sample; also used for /overview/persist minimal 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)