Skip to main content

Activities Activities Management Admin Adds And Removes An Activity Gate

EPIC: activities
Admin · Activities catalog CRUD + activity-gate editor
STORY: activities_management
As an admin, I can create, edit and archive the household activities and gate them behind a chore + token balance so members have a working, unlockable catalog.
AC: admin_adds_and_removes_an_activity_gate
An admin opens an activity's unlock requirements, adds a gate (complete a chore + hold a token balance), then removes it — each gate write reloads the gate list via the facade.

open the Manage page (Activities tab) with one activity

User Actions:
  • Tapped: widget with text "Profile"
  • Tapped: widget with key [<'MorePage.adminEntry'>]
  • Tapped: widget with key [<'AdminHubPage.manageEntry'>]
  • Tapped: widget with text "Activities"
Expect:
  • the seeded activity is listed
Events:
  • [ANALYTIC] [page]: ProfileRoute
  • MoreStarted
  • MoreCurrentMemberChanged
  • [ANALYTIC] [page]: AdminRoute
  • [ANALYTIC] [page]: ManageRoute
  • RewardsStarted
  • ActivitiesStarted
  • ChoresManagementStarted
  • ChoreRequestsManageStarted

open the unlock-requirements sheet (no gates yet)

User Actions:
  • Tapped: widget with key [<'ActivitiesPage.gatesButton_activity-trampoline'>]
Expect:
  • a never-gated activity opens to the empty state
  • the household chore is offered as a gate condition
Events:
  • SpendGatesStarted

add a gate — require dishes + 20 tokens

User Actions:
  • Tapped: widget with key [<'SpendGatesSheet.choreOption_chore-dishes'>]
  • Entered text: 20
  • Tapped: widget with key [<'SpendGatesSheet.addGateButton'>]
Expect:
  • the new gate appears after the reload
Events:
  • SpendGateAdded

remove the gate — back to no requirements

User Actions:
  • Tapped: widget with key [<'SpendGatesSheet.removeGate_gate-1'>]
Expect:
  • removing the last gate returns the empty state
Events:
  • SpendGateRemoved