ATS-PFM-TNL-005Apply workspace availability consistently: Acceptance Test Set
MarkdownTest Scenarios
9 scenarios proving CAP-PFM-TNL-005; 9 bound to an existing test.
01 Closed workspaces share the unavailable responseapinegativetest
- Proves
BR-CAP-PFM-TNL-005-01 - Preconditions
- Platform and CRM fixtures cover active, disabled, provisioning and deleting workspaces.
- Steps
- Call ordinary workspace routes as a customer user.
- Expected
- Only the active enabled fixture is admitted; closed fixtures use the unavailable response.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is served a tenant-scoped route in an active tenant (the premise every refusal below is read against)
02 System staff access has its own boundaryapitest
- Proves
BR-CAP-PFM-TNL-005-02 - Preconditions
- The workspace is disabled.
- Steps
- Call system and console routes using the corresponding staff contexts.
- Expected
- The system exception admits authorized staff while console context receives no exception.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is past the gate in a tenant its own customer could not reach, because staff reach every tenant
04 Loading preserves route and staff exceptionsapinegativetest
- Proves
BR-CAP-PFM-TNL-005-04 - Preconditions
- The workspace is loading.
- Steps
- Call an ordinary customer route, a data-job route and an authorized staff system route.
- Expected
- Ordinary customer use is refused while data jobs and the staff exception remain admitted.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a tenant whose initial data import is open
06 Cache expiry prompts a fresh lifecycle readunittest
- Proves
BR-CAP-PFM-TNL-005-06 - Preconditions
- A process has cached lifecycle facts.
- Steps
- Read before expiry, at expiry and after explicit invalidation.
- Expected
- Fresh entries are reused; expired or forgotten entries cause another database read.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/unit/services/access/tenant-availability.spec.js#still answers from the cache one millisecond before the window closes
08 Opening changes ordinary availabilityapitest
- Proves
AS-JNY-PFM-TNL-001-01 - Preconditions
- The construction journey includes a before-and-after gate fixture.
- Steps
- Read ordinary availability around activation.
- Expected
- Provisioning refuses customer access and active enabled lifecycle admits it.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a tenant that is still being provisioned
09 Loading journey retains its staff exceptionapitest
- Proves
AS-JNY-PFM-TNL-003-03 - Preconditions
- The import journey’s workspace is loading.
- Steps
- Exercise ordinary customer, data-job and staff system access.
- Expected
- Customer routes close except for data-job work and staff system access remains possible.
- Data
- Use the workspace, caller and collaborator fixtures declared by the bound tests.
- Bound to
- Source
- services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a tenant whose initial data import is open