Skip to content

ATS-PFM-MTD-008Manage Shared Forms and Record Layouts: Capability Test Specification

Markdown

ATS-PFM-MTD-008

Manage Shared Forms and Record Layouts: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleMetadata and Organization-defined RecordsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-PFM-MTD-070
  • Validation covered
  • Permission covered
  • Edge gap: FND-PFM-MTD-070
  • Failure gap: FND-PFM-MTD-070
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-PFM-MTD-008; 11 bound to an existing test.

01 Opaque presentation documents have bounded sizeboundaryapinegativetest
Proves
BR-CAP-PFM-MTD-008-01 INV-DOM-PFM-MTD-003-02
Preconditions
A layout can be created.
Steps
[ { "do": "Store an object document, retrieve it and submit oversized or nonobject content.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a layout larger than the stated maximum, telling the person the limit and the size" } ]
Expected
Valid JSON returns unchanged and invalid shape or size is refused.
Data
A layout can be created.
Bound to
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a layout larger than the stated maximum, telling the person the limit and the size
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#accepts a layout just inside the maximum, so the limit is where it is stated
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#stores an arbitrary nested document unchanged, because the backend never reads inside it
Source
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a layout larger than the stated maximum, telling the person the limit and the size
02 Purpose cannot change after creationinvariantapinegativetest
Proves
BR-CAP-PFM-MTD-008-02 INV-DOM-PFM-MTD-003-01
Preconditions
A stored definition has one purpose.
Steps
[ { "do": "Replace and patch it naming a different purpose.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a replacement that names another purpose, naming both the stored one and the request’s" } ]
Expected
Both operations fail and identify the conflicting purposes.
Data
A stored definition has one purpose.
Bound to
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a replacement that names another purpose, naming both the stored one and the request’s
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a directive that would change the purpose
Source
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses a replacement that names another purpose, naming both the stored one and the request’s
03 Purpose-specific permissions distinguish use from administrationpermissionapinegativetest
Proves
BR-CAP-PFM-MTD-008-03
Preconditions
A reader and administrator can access contacts.
Steps
[ { "do": "Read as the reader, attempt reader writes and administer as the authorized role.", "provenance": "test", "source": "services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 403 to a caller who may read contacts but not administer their layouts" } ]
Expected
Reading succeeds, unauthorized writes fail and purpose administration is permitted.
Data
A reader and administrator can access contacts.
Bound to
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 403 to a caller who may read contacts but not administer their layouts
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 200 to a caller who may merely read the record the layout is for
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 403 to an administrator of another purpose’s layouts
Source
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 403 to a caller who may read contacts but not administer their layouts
04 Inaccessible definitions stay undisclosedpermissionapinegativetest
Proves
BR-CAP-PFM-MTD-008-04 INV-DOM-PFM-MTD-003-06
Preconditions
Two purposes have definitions and a caller reaches one.
Steps
[ { "do": "Read and mutate the other definition and request all or purpose-filtered lists.", "provenance": "test", "source": "services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 404 for a definition of a purpose the caller may not read, rather than confirming it exists" } ]
Expected
The hidden definition is not found, omitted from general lists and absent from the filtered page.
Data
Two purposes have definitions and a caller reaches one.
Bound to
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 404 for a definition of a purpose the caller may not read, rather than confirming it exists
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#leaves out the purposes the caller may not read, so a list never discloses another
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers an empty list for a purpose the caller may not read
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 404, not 403, to a caller who may not even read it
Source
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 404 for a definition of a purpose the caller may not read, rather than confirming it exists
05 Unknown purposes and broad wildcards do not authorize creationpermissionapinegativetest
Proves
BR-CAP-PFM-MTD-008-05
Preconditions
A Platform-wide staff context is available.
Steps
[ { "do": "Create under an unknown purpose and under an unrelated purpose wildcard.", "provenance": "test", "source": "services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a purpose this build does not register, naming it" } ]
Expected
The unknown purpose is invalid and the wildcard does not authorize the other create.
Data
A Platform-wide staff context is available.
Bound to
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a purpose this build does not register, naming it
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#is refused the create of the other purpose too, because the wildcard is not what this route answers
Source
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a purpose this build does not register, naming it
06 Custom-object definitions follow live object availabilityinteractionapinegativetest
Proves
BR-CAP-PFM-MTD-008-06
Preconditions
Draft, active and archived objects and record readers exist.
Steps
[ { "do": "Create and read forms, attempt reader changes and request missing or archived object forms.", "provenance": "test", "source": "services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#answers 404 for a stored form once its custom object is archived" } ]
Expected
Live-object definitions can be stored and read with suitable keys; unauthorized changes and unavailable-object requests fail.
Data
Draft, active and archived objects and record readers exist.
Bound to
services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#refuses a reader of custom records a change to the form, 403
services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#refuses a form for a custom object the tenant does not have, 404
services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#answers 404 for a stored form once its custom object is archived
Source
services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#answers 404 for a stored form once its custom object is archived
07 Definition mutations respect versions and locksconcurrencyapinegativetest
Proves
BR-CAP-PFM-MTD-008-07 INV-DOM-PFM-MTD-003-07
Preconditions
A definition is newer than the submitted version and others have write or delete locks.
Steps
[ { "do": "Replace stale and update-locked definitions and delete a locked definition.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses the version the caller did not read, as a StaleObject" } ]
Expected
Every prohibited mutation is refused.
Data
A definition is newer than the submitted version and others have write or delete locks.
Bound to
Source
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#refuses the version the caller did not read, as a StaleObject
08 Assignments require a compatible existing definitionvalidationapinegativetest
Proves
BR-CAP-PFM-MTD-008-09 INV-DOM-PFM-MTD-003-04
Preconditions
Definition fixtures span kinds, purposes and workspaces.
Steps
[ { "do": "Assign missing, foreign-workspace, wrong-purpose and wrong-kind definitions.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#refuses an assignment naming a definition of the wrong kind, because each slot’s column references one table" } ]
Expected
Database references refuse each incompatible assignment.
Data
Definition fixtures span kinds, purposes and workspaces.
Bound to
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#refuses an assignment naming a definition of the wrong kind, because each slot’s column references one table
Source
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#refuses an assignment naming a definition of the wrong kind, because each slot’s column references one table
09 Create and edit assignments may share a formruleapitest
Proves
BR-CAP-PFM-MTD-008-10
Preconditions
Two forms belong to one purpose.
Steps
[ { "do": "Assign different forms, then assign one form to both slots.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#holds a different console form for creating a record and for editing one, each under its own column" } ]
Expected
Both arrangements are stored.
Data
Two forms belong to one purpose.
Bound to
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#holds a different console form for creating a record and for editing one, each under its own column
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#holds the same console form in both slots, which is what a record type names until somebody splits them
Source
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#holds a different console form for creating a record and for editing one, each under its own column
10 References prevent definition deletionconcurrencyapinegativetest
Proves
BR-CAP-PFM-MTD-008-11 INV-DOM-PFM-MTD-003-05
Preconditions
Two referrers assign a layout.
Steps
[ { "do": "Delete it, race assignment with deletion and repeat after clearing references.", "provenance": "test", "source": "services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#names every referring row, in a stable order, when more than one assigns it" } ]
Expected
The initial refusal lists uses, the race leaves no dangling assignment and an unassigned definition can be deleted.
Data
Two referrers assign a layout.
Bound to
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#names every referring row, in a stable order, when more than one assigns it
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 409 while something still assigns the definition, naming the referring row
services-platform:modules/layouts/tests/integration/db/layout-assignments.table.integration.spec.js#refuses the delete of a console form assigned as an edit form, by that slot’s own key
Source
services-platform:modules/layouts/tests/integration/services/persistence/console-page-layouts.integration.spec.js#names every referring row, in a stable order, when more than one assigns it
11 Malformed cursors are rejectedvalidationapinegativetest
Proves
BR-CAP-PFM-MTD-008-08
Preconditions
A caller can list page layouts.
Steps
[ { "do": "Supply an invalid cursor.", "provenance": "test", "source": "services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a ?cursor= it did not issue" } ]
Expected
The list request fails as invalid.
Data
A caller can list page layouts.
Bound to
Source
services-platform:modules/layouts/tests/e2e/console-page-layouts-api.e2e.spec.js#answers 400 for a ?cursor= it did not issue
12 Object archival closes form consumption but preserves the recordinteractionapiproposed
Proves
BR-CAP-PFM-MTD-008-06 BR-CAP-PFM-MTD-003-06 BR-CAP-PFM-MTD-009-08 BR-CAP-PFM-MTD-012-01
Preconditions
An active custom object has a stored form and record.
Steps
[ { "do": "Read both, archive the object, request the form and open the record by its retained link.", "provenance": "proposed", "source": [ "services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#answers 404 for a stored form once its custom object is archived", "services-platform:modules/layouts/tests/integration/services/persistence/purpose-capabilities.integration.spec.js#refuses a console form", "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-objects.integration.spec.js#restores an archived object as a draft, keeping its object id", "services-platform:modules/custom-objects/tests/e2e/custom-object-records.e2e.spec.js#refuses every write of it with 409 and changes nothing" ] } ]
Expected
Compare the two read surfaces and attempt a record edit.
Data
An active custom object has a stored form and record.
Source
services-platform:modules/layouts/tests/e2e/custom-object-forms.e2e.spec.js#answers 404 for a stored form once its custom object is archived,services-platform:modules/layouts/tests/integration/services/persistence/purpose-capabilities.integration.spec.js#refuses a console form,services-platform:modules/custom-objects/tests/integration/services/persistence/custom-objects.integration.spec.js#restores an archived object as a draft, keeping its object id,services-platform:modules/custom-objects/tests/e2e/custom-object-records.e2e.spec.js#refuses every write of it with 409 and changes nothing

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.