ATS-PFM-QRY-006 Save and share reusable questions: Capability Test Specification
Markdown Design / Platform / Questions, record exploration and data delivery / Reusable questions / Capability Test Specification Show evidence (sources, provenance, origins, pinned commits)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 management permission api negative test
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 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 membership permission api negative test
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 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 writing permission api negative test
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 Source services-platform:modules/queries/tests/e2e/read-tier.e2e.spec.js #lists the organization’s saved query 04 Organization sharing needs its own grant permission api negative test
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 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 manager permission api negative test
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 Source services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js #refuses a colleague editing the organization’s query as 403 07 Role updates replace the selected set boundary api test
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 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] 10 Saves reject questions unavailable to the saver validation api negative test
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 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 whitespace invariant api test
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 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 owner validation api negative test
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 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 version concurrency api negative test
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 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 deleted interaction api negative test
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 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 metadata invariant api test
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 Source services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js #leaves a colleague’s private query out of the numbered page too 17 A colleague runs a shared question with personal values interaction api negative proposed
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 report interaction api proposed
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 removed interaction api proposed
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 ← Previous Capability Test Specification ATS-PFM-QRY-005 · Provide a customer with a tailored dataset: Capability Test Specification Next Capability Test Specification → ATS-PFM-QRY-007 · Run a saved question for the current reader: Capability Test Specification