Skip to content

ATS-PFM-QRY-006Save and share reusable questions: Capability Test Specification

Markdown

ATS-PFM-QRY-006

Save and share reusable questions: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleQuestions, record exploration and data deliveryRevision2

Read atservices-platform ad3f6a65react-console baf6dae3rhythm-v2-docs 99376625

Coverage

  • Rule covered
  • Transition not-applicable
  • Validation covered
  • Permission covered
  • Edge gap: FND-PFM-QRY-056
  • Failure gap: FND-PFM-QRY-056
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

19 scenarios proving CAP-PFM-QRY-006; 16 bound to an existing test.

01 Private questions remain outside customer managementpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-006-01 INV-DOM-PFM-QRY-002-02
Preconditions
A private query exists beside colleague and manager contexts.
Steps
Read and list it using those customer contexts.
Expected
Both receive 404 and neither catalog lists the query.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#tells a colleague that somebody else’s private query does not exist, as 404
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a colleague’s private query out of the list
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#tells a colleague that somebody else’s private query does not exist, as 404
02 Role visibility follows active membershippermissionapinegativetest
Proves
BR-CAP-PFM-QRY-006-02
Preconditions
A saved question is shared with one role.
Steps
Read and list it as a holder and nonholder.
Expected
The holder can read it; the nonholder receives not found and no list entry.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#lets a holder of the selected role read the record [E2E-SQ-08]
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers not found for a role the caller does not hold, and excludes the record from the list [E2E-SQ-09]
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#lets a holder of the selected role read the record [E2E-SQ-08]
03 Read Only consumes shared definitions without writingpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-006-03
Preconditions
A Read Only user can discover an organization query.
Steps
List, open and execute it, then attempt creation, replacement and deletion.
Expected
Reads succeed and each attempted write returns 403.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js#is refused replacing a saved query with 403
Source
services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js#lists the organization’s saved query
04 Organization sharing needs its own grantpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-006-04
Preconditions
Otherwise equivalent callers differ in share permission.
Steps
Create shared queries and attempt to make a shared query private.
Expected
Audience changes fail without share authority and succeed with it.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses making the query the organization’s without the power to share it as 403
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses the owner taking its shared query back to private without the power to share as 403
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses making the query the organization’s without the power to share it as 403
05 Shared maintenance belongs to owner or managerpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-006-05
Preconditions
An organization-visible question belongs to another person.
Steps
Edit and delete it as a colleague and manager.
Expected
The colleague is refused and the manager can maintain it.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a colleague editing the organization’s query as 403
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#lets a manager edit the organization’s query
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a colleague deleting the organization’s query as 403
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#lets a manager delete the organization’s query
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a colleague editing the organization’s query as 403
06 Support staff have the recorded private-work exceptionpermissionunittest
Proves
BR-CAP-PFM-QRY-006-06
Preconditions
A staff context has a workspace grant and a customer manager does not own the private question.
Steps
Evaluate read, edit and share access for both.
Expected
Staff receive the private-work powers; the customer manager cannot read it.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/unit/services/saved-queries/saved-query-access.spec.ts#lets staff write a colleague’s private query, which a non-staff caller may not
services-platform:modules/queries/tests/unit/services/saved-queries/saved-query-access.spec.ts#hides a colleague’s private query from a non-staff holder of platform.saved-queries.manage
Source
services-platform:modules/queries/tests/unit/services/saved-queries/saved-query-access.spec.ts#shows a colleague’s private query to staff
07 Role updates replace the selected setboundaryapitest
Proves
BR-CAP-PFM-QRY-006-07
Preconditions
A query already has role visibility.
Steps
Replace its roles, change to organization visibility and read a private query.
Expected
The role set is replaced, and non-role audiences expose no role selection.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#creates a role-shared query and answers its stored role_ids [E2E-SQ-06]
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#replaces the whole selected-role set rather than appending to it [E2E-SQ-07]
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers no role_ids property when an update takes a role-shared query to the whole organization [E2E-SQ-12]
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#creates a role-shared query and answers its stored role_ids [E2E-SQ-06]
08 Dependent reports block audience narrowinginteractionapinegativetest
Proves
BR-CAP-PFM-QRY-006-08 INV-DOM-PFM-QRY-002-06
Preconditions
Reports and dashboards depend on questions with wider audiences.
Steps
Narrow their sources before and after narrowing the presentations.
Expected
Initial saves report blocking dependencies and write nothing; aligned audiences permit the change.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#refuses narrowing it to private with 409 saved_query_narrower_than_reports, naming the report
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#refuses dropping a role a report over it is shared with, naming that report and its roles
services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js#is refused 409 saved_query_narrower_than_reports, naming the report
Source
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#refuses narrowing it to private with 409 saved_query_narrower_than_reports, naming the report
09 Omitted audiences preserve existing sharingruleapitest
Proves
BR-CAP-PFM-QRY-006-09
Preconditions
One query is role-shared and another organization-visible.
Steps
Save without visibility and save role visibility without new roles.
Expected
The existing visibility and selected roles survive.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#keeps a role-shared query’s visibility and roles when the save states no visibility
services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js#keeps the query’s visibility when a replacement leaves it out
Source
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#keeps a role-shared query’s visibility and roles when the save states no visibility
10 Saves reject questions unavailable to the savervalidationapinegativetest
Proves
BR-CAP-PFM-QRY-006-10
Preconditions
Definitions include invalid criteria and a forbidden dataset.
Steps
Save each proposed question.
Expected
Definition problems return 400 and missing data access returns 403.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a body whose definition cannot be run as written as 400
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a dataset this caller may not query as 403, however the library is reached
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a body whose definition cannot be run as written as 400
11 Stored values preserve intentional whitespaceinvariantapitest
Proves
BR-CAP-PFM-QRY-006-11 INV-DOM-PFM-QRY-002-03
Preconditions
A criterion text value has a trailing space.
Steps
Save the query and read its definition.
Expected
The value and full definition retain their submitted content.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a criterion’s value exactly as the person typed it, spaces and all
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers the definition it stored, and the version of the definition format
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a criterion’s value exactly as the person typed it, spaces and all
12 Query names normalize within one ownervalidationapinegativetest
Proves
BR-CAP-PFM-QRY-006-12 INV-DOM-PFM-QRY-002-04
Preconditions
An owner already has a question named Q3.
Steps
Create or rename another to the normalized name and try the same name for another owner and workspace.
Expected
The same-owner duplicates fail while the separate ownership contexts allow reuse.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a create whose name normalizes to one the owner already has, naming the trimmed proposed name as 400 [E2E-SQ-01]
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a rename that would duplicate another of the owner’s saved queries as 400, leaving the row unrenamed [E2E-SQ-02]
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#lets a different owner save the same name, with the created record answered under that owner [E2E-SQ-03]
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a create whose name normalizes to one the owner already has, naming the trimmed proposed name as 400 [E2E-SQ-01]
13 Query replacement requires its read versionconcurrencyapinegativetest
Proves
BR-CAP-PFM-QRY-006-13 INV-DOM-PFM-QRY-002-13
Preconditions
A query is currently at version two.
Steps
Replace using version one and without a version.
Expected
The stale request returns 409 and the missing version returns 400.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a replacement at a version that is no longer in force as 409
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a body that states no version at all as 400
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a replacement at a version that is no longer in force as 409
14 Dependent sources cannot be deletedinteractionapinegativetest
Proves
BR-CAP-PFM-QRY-006-14 INV-DOM-PFM-QRY-002-05
Preconditions
Separate queries are used by reports, widgets and schedules.
Steps
Attempt to remove every source query.
Expected
Each request reports its blocking dependency with 409 and retains the query.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses to delete a saved query a report presents as 409 saved_query_reported
services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses to delete a saved query one of its widgets draws on as 409 saved_query_reported
Source
services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses to delete a saved query a report presents as 409 saved_query_reported
15 Private work does not leak through library metadatainvariantapitest
Proves
BR-CAP-PFM-QRY-006-15
Preconditions
A colleague owns a private query and another query has lost dataset access.
Steps
Inspect pages, counts and facets, then open the problematic accessible query.
Expected
Private work is absent from metadata; the readable query reports problems rather than rejecting its read.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a colleague’s private query out of the numbered page too
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers the record and its problems, not a refusal, when the dataset is no longer the caller’s to query
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#leaves a colleague’s private query out of the numbered page too
16 Saved-question delivery retains deletion protectioninteractionbrowsertest
Proves
AS-JNY-PFM-QRY-002-01 AS-JNY-PFM-QRY-002-02
Preconditions
A coordinator retains a membership question for recurring delivery.
Steps
Execute the saved-question browser journey.
Expected
The question is saved and scheduled, and its active schedule blocks deletion.
Data
Use the existing binding’s controlled fixture data.
Bound to
Source
react-console:acceptance/reporting/playwright/journeys/schedules/RPT-ACC-0434.spec.ts#RPT-ACC-0434
17 A colleague runs a shared question with personal valuesinteractionapinegativeproposed
Proves
BR-CAP-PFM-QRY-006-02 BR-CAP-PFM-QRY-007-01
Preconditions
Two users share one role and a saved personal-task question with a requested date.
Steps
Run the shared question as each user with the same date, then remove one user’s dataset grant and rerun.
Expected
Each successful answer contains that runner’s tasks; the revoked runner receives no result.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers not found for a role the caller does not hold, and excludes the record from the list [E2E-SQ-09],services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses to run it for a caller who may not query the dataset as 403, however it was shared
18 A source audience cannot strand a wider reportinteractionapiproposed
Proves
BR-CAP-PFM-QRY-006-08 BR-CAP-PFM-QRY-011-04
Preconditions
A role-shared report depends on an organization-shared query.
Steps
Attempt to make the query private, then narrow the report and repeat the query change.
Expected
The first change identifies the blocking report; compatible audience changes allow the query to become private.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-narrowing.integration.spec.js#refuses narrowing it to private with 409 saved_query_narrower_than_reports, naming the report,services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses a report shared wider than its saved query as 409 ReportSharedWiderThanQuery, naming the query
19 Scheduling protects the retained source until removedinteractionapiproposed
Proves
BR-CAP-PFM-QRY-006-14 BR-CAP-PFM-QRY-015-03
Preconditions
A saved contact question has an enabled query schedule.
Steps
Edit the question, compare the schedule, attempt query deletion, then delete the schedule and try again.
Expected
The schedule keeps its earlier copy and exposes the change; deletion succeeds only after the dependency is removed.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses to delete a saved query a report presents as 409 saved_query_reported,services-platform:modules/queries/tests/integration/services/schedules/query-schedule-routes.integration.spec.js#flags the saved query as changed since the schedule was set up

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.