Test Scenarios
24 scenarios proving CAP-PFM-SEC-003; 14 bound to an existing test.
01 Customer administrators cannot control setuppermissionapinegativetest
- Proves
BR-CAP-PFM-SEC-003-01 - Preconditions
- Prepare a signed customer-administrator context.
- Steps
- Attempt workspace creation, progress reading, retry and participant initialization.
- Expected
- Each request fails and leaves the existing workspace intact.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#may not ask for a tenant at all
02 Provisioning identifier validationvalidationapinegativetest
- Proves
BR-CAP-PFM-SEC-003-02 INV-DOM-PFM-SEC-002-01 - Preconditions
- Prepare an occupied identifier and a retired workspace identifier.
- Steps
- Request creation with missing, generated, adjacent-dot, reserved and occupied values, an obsolete domain field, and a new customer without an identifier.
- Expected
- Invalid or missing values return their 400 codes; occupation returns 409; the obsolete field is rejected.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenants.e2e.spec.js#refuses a create that names no id as 400 tenant_id_required, naming id
04 Readiness precedes activationtransitionapitest
- Proves
BR-CAP-PFM-SEC-003-04 - Preconditions
- Register the participants used by the fixture.
- Steps
- Read the workspace during provisioning and after the job finishes.
- Expected
- It begins unavailable and becomes active with an activation timestamp after participant work and readiness checks.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#answers a tenant that is not usable yet, because the work has only been asked for
05 Failure retention and targeted retryfailureapinegativetest
- Proves
BR-CAP-PFM-SEC-003-05 - Preconditions
- Configure one participant to fail on its first call.
- Steps
- Run provisioning, retry the failure and attempt retry after activation.
- Expected
- Failure state and summary are retained; the retry finishes remaining work; retry from active state fails.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#leaves the tenant saying its provisioning failed, which is what makes it retryable
11 Loading status and initiation informationtransitionapinegativetest
- Proves
BR-CAP-PFM-SEC-003-13 INV-DOM-PFM-SEC-002-04 - Preconditions
- Prepare a live workspace and an implementation workspace.
- Steps
- Open initial loading for each.
- Expected
- Live status is refused and unchanged; implementation enters loading with the initiating person, time and reason.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a live tenant, an initial import going only into an implementation tenant
12 Reset confirmation and participant supportvalidationapinegativetest
- Proves
BR-CAP-PFM-SEC-003-14 INV-DOM-PFM-SEC-002-11 - Preconditions
- Prepare a loading workspace.
- Steps
- Try wrong confirmation, unsupported participant and concurrent reset, then run a supported reset.
- Expected
- Invalid requests leave the workspace intact; the successful reset removes imported records, retains configuration and leaves loading in place.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a confirmation that is not the tenant’s own id, without saying what to type
13 Activation permission independently of importpermissionapinegativetest
- Proves
BR-CAP-PFM-SEC-003-15 - Preconditions
- Prepare a loaded workspace and callers with import-only, customer and activation authority.
- Steps
- Request activation with each caller.
- Expected
- The first two receive refusals; activation authority succeeds while preserving business status and load initiation information.
- Data
- Use the records described in the setup.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses the staff member who ran the import, activation being the other key
14 The provisioning wizard and job handoffrulebrowsertest
- Proves
AS-JNY-PFM-SEC-001-01 AS-JNY-PFM-SEC-001-02 - Preconditions
- Start an HQ staff session.
- Steps
- Complete a new-customer provisioning form, submit it and follow the returned job; also submit a taken identifier.
- Expected
- The job page presents progress, and an occupied identifier appears as a field-related error.
- Data
- Use the records described in the setup.
- Bound to
- Source
- react-console:e2e/mock/hq-ops.mock.spec.ts#walks every step and lands on the job it started
15 Workspace lifecycle: provisioning to activetransitionapiproposed
- Proves
BR-CAP-PFM-SEC-003-04 - Preconditions
- Prepare a run-owned workspace lifecycle in provisioning state with the authority and inputs required by the cited transition.
- Steps
- [
{
"do": "Finish all enabled participants and run the setup activation task.",
"expect": "After the stated action, observe the workspace lifecycle in active state. This case does not require an additional history event unless the transition explicitly defines one.",
"provenance": "proposed",
"source": [
"services-platform:modules/tenants/services/persistence/tenants.ts:activateProvisionedTenant",
"services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5."
]
}
]
- Expected
- After the stated action, observe the workspace lifecycle in active state. This case does not require an additional history event unless the transition explicitly defines one.
- Data
- A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
- Source
- services-platform:modules/tenants/services/persistence/tenants.ts:activateProvisionedTenant,services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5.
16 Workspace lifecycle: provisioning to provisioning_failedtransitionapiproposed
- Proves
BR-CAP-PFM-SEC-003-05 - Preconditions
- Prepare a run-owned workspace lifecycle in provisioning state with the authority and inputs required by the cited transition.
- Steps
- [
{
"do": "Fail an unfinished setup job and run its failure handler; repeat through stranded-job repair.",
"expect": "After the stated action, observe the workspace lifecycle in provisioning_failed state. This case does not require an additional history event unless the transition explicitly defines one.",
"provenance": "proposed",
"source": [
"services-platform:modules/tenants/services/persistence/tenants.ts:failTenantProvisioning",
"services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5."
]
}
]
- Expected
- After the stated action, observe the workspace lifecycle in provisioning_failed state. This case does not require an additional history event unless the transition explicitly defines one.
- Data
- A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
- Source
- services-platform:modules/tenants/services/persistence/tenants.ts:failTenantProvisioning,services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5.
17 Workspace lifecycle: provisioning_failed to provisioningtransitionapiproposed
- Proves
BR-CAP-PFM-SEC-003-05 - Preconditions
- Prepare a run-owned workspace lifecycle in provisioning_failed state with the authority and inputs required by the cited transition.
- Steps
- [
{
"do": "Retry the failed setup using staff provisioning authority.",
"expect": "After the stated action, observe the workspace lifecycle in provisioning state. This case does not require an additional history event unless the transition explicitly defines one.",
"provenance": "proposed",
"source": [
"services-platform:modules/tenants/services/provisioning/submit-tenant-provisioning.ts (Retrying)",
"services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5."
]
}
]
- Expected
- After the stated action, observe the workspace lifecycle in provisioning state. This case does not require an additional history event unless the transition explicitly defines one.
- Data
- A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
- Source
- services-platform:modules/tenants/services/provisioning/submit-tenant-provisioning.ts (Retrying),services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5.
18 Workspace lifecycle: active to loadingtransitionapiproposed
- Proves
BR-CAP-PFM-SEC-003-13 - Preconditions
- Prepare a run-owned workspace lifecycle in active state with the authority and inputs required by the cited transition.
- Steps
- [
{
"do": "Open an initial load as the import operator.",
"expect": "After the stated action, observe the workspace lifecycle in loading state. This case does not require an additional history event unless the transition explicitly defines one.",
"provenance": "proposed",
"source": [
"services-platform:modules/tenants/services/persistence/tenants.ts:enterTenantLoading",
"services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5."
]
}
]
- Expected
- After the stated action, observe the workspace lifecycle in loading state. This case does not require an additional history event unless the transition explicitly defines one.
- Data
- A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
- Source
- services-platform:modules/tenants/services/persistence/tenants.ts:enterTenantLoading,services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5.
19 Workspace lifecycle: loading to activetransitionapiproposed
- Proves
BR-CAP-PFM-SEC-003-15 - Preconditions
- Prepare a run-owned workspace lifecycle in loading state with the authority and inputs required by the cited transition.
- Steps
- [
{
"do": "Activate the loaded workspace as a staff member holding activation authority.",
"expect": "After the stated action, observe the workspace lifecycle in active state. This case does not require an additional history event unless the transition explicitly defines one.",
"provenance": "proposed",
"source": [
"services-platform:modules/tenants/services/persistence/tenants.ts:activateLoadedTenant",
"services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5."
]
}
]
- Expected
- After the stated action, observe the workspace lifecycle in active state. This case does not require an additional history event unless the transition explicitly defines one.
- Data
- A disposable customer, workspace and named actor; a controllable clock where the transition depends on time.
- Source
- services-platform:modules/tenants/services/persistence/tenants.ts:activateLoadedTenant,services-platform at ad3f6a65: modules/tenants/services/lifecycle/lifecycle-transitions.ts; services/persistence/tenants.ts; services/provisioning/*; services/deletion/*; services/access/tenant-availability.ts; db/tenants.table.ts; docs/tenants/tenant-lifecycle-plan.md §2.2, §4, §5.
20 Prepare a workspace for customer use with establish and administer a customerinteractionapiproposed
- Proves
BR-CAP-PFM-SEC-001-02 BR-CAP-PFM-SEC-003-03 - Preconditions
- A chosen customer and workspace identifier are unused.
- Steps
- Submit setup with a new customer, replay it, then try another submission with the same workspace identifier.
- Expected
- Replay returns the original customer, workspace and job; the competing submission creates none.
- Data
- An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
- Source
- services-platform:modules/customers/services/persistence/customers.ts:requireCustomerId,services-platform:modules/tenants/tests/integration/services/provisioning/provision-tenant.integration.spec.js#answers the same tenant and the same job when the same submission is sent twice
21 Prepare a workspace for customer use with maintain workspace information and operating statusinteractionapinegativeproposed
- Proves
BR-CAP-PFM-SEC-002-09 BR-CAP-PFM-SEC-003-13 - Preconditions
- An active implementation workspace has an ordinary caller and an import operator.
- Steps
- Open an initial load, try ordinary work, then activate with a separate authorized staff identity.
- Expected
- Ordinary work is refused during loading and resumes after activation; implementation status remains unchanged.
- Data
- An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
- Source
- services-platform:modules/tenants/services/access/tenant-availability.ts:tenantAvailabilityOf,services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a live tenant, an initial import going only into an implementation tenant
22 Prepare a workspace for customer use with manage a workspace retirement requestinteractionapinegativeproposed
- Proves
BR-CAP-PFM-SEC-003-05 BR-CAP-PFM-SEC-004-02 - Preconditions
- A failed setup has a disabled workspace and completed participant work.
- Steps
- Request retirement instead of retrying setup, then attempt a setup retry against the pending retirement.
- Expected
- Retirement owns the lifecycle and setup cannot reactivate the workspace.
- Data
- An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
- Source
- services-platform:modules/tenants/tests/integration/services/provisioning/provision-tenant.integration.spec.js#does the missing work and not the finished work when it is provisioned again,services-platform:modules/tenants/tests/integration/services/deletion/request-deletion.integration.spec.js#refuses a tenant that is still live, because people must lose access first
23 Prepare a workspace for customer use with offer and manage an invitationinteractionapiproposed
- Proves
BR-CAP-PFM-SEC-003-06 BR-CAP-PFM-SEC-008-06 - Preconditions
- A new-customer setup specifies the first administrator.
- Steps
- Complete setup, replay its invitation step, and inspect the invitation and pending assignments.
- Expected
- One customer-wide administrator offer exists and pending assignments grant no access before acceptance.
- Data
- An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
- Source
- services-platform:modules/tenants/tests/integration/services/provisioning/provision-tenant.integration.spec.js#does not invite them a second time when the provisioning is run again,services-platform:modules/security/tests/unit/services/invitations/invite-user.spec.js#refuses a grant that reaches outside the wall the user is being created in, before a user exists
24 Prepare a workspace for customer use with control staff access to customer workspacesinteractionapiproposed
- Proves
BR-CAP-PFM-SEC-003-04 BR-CAP-PFM-SEC-017-08 - Preconditions
- An eligible Rhythm Administrator exists before a new customer workspace is provisioned.
- Steps
- Finish provisioning, read standing access, and enter the workspace with a fresh context.
- Expected
- Standing access and its assignment agree on the new customer and allow the intended customer entry.
- Data
- An isolated customer with two workspaces, ordinary and staff identities, and records owned by this run.
- Source
- services-platform:modules/tenants/tests/integration/services/provisioning/provision-tenant.integration.spec.js#asks every participant to confirm what it made before the tenant is opened,services-platform:modules/security/tests/integration/services/staff-access/rhythm-administrator-standing-access.integration.spec.js#gives each Rhythm Administrator one active customer-level standing grant in every customer but Rhythm’s own