Skip to content

ATS-COM-FUL-020Import Commerce history and reconcile source records: Capability Test Specification

Markdown

ATS-COM-FUL-020

Import Commerce history and reconcile source records: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

  • Rule gap: FND-COM-FUL-075
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge gap: FND-COM-FUL-075
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-COM-FUL-075
  • Invariant covered
  • Interaction covered

Test Scenarios

11 scenarios proving CAP-COM-FUL-020; 10 bound to an existing test.

01 Collection jobs reject malformed or unauthorized submissionsvalidationapinegativetest
Proves
BR-CAP-COM-FUL-020-02 BR-CAP-COM-FUL-020-03
Preconditions
Reader-only, portal and bulk-authorized identities are available.
Steps
Submit invalid payloads and exercise each caller's submission.
Expected
Field errors identify invalid input, unauthorized callers fail and a valid authorized request is accepted.
Data
Fixtures for collection jobs reject malformed or unauthorized submissions.
Bound to
services-commerce:modules/data-operations/tests/unit/api/data-jobs-schemas.spec.js#refuses a selection with a patch: no Commerce operation changes records in place by id
services-commerce:modules/data-operations/tests/unit/api/data-jobs-schemas.spec.js#refuses a record naming neither a source key nor an id, and keyed records without a source system
services-commerce:modules/data-operations/tests/unit/api/data-jobs-schemas.spec.js#refuses an operation outside insert, upsert and update, and a mode outside validate and apply
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#refuses a principal holding the read key alone on every data-job route of the collection, 403 permission_missing
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#refuses a portal member: the routes are console access
services-commerce:modules/data-operations/tests/unit/operations/data-operations.spec.js#declares, for each collection, the bulk key a submission needs and the per-record key it re-checks
Source
services-commerce:modules/data-operations/tests/unit/api/data-jobs-schemas.spec.js#refuses a selection with a patch: no Commerce operation changes records in place by id
02 Job replay and impact digest protect applicationinvariantapinegativetest
Proves
BR-CAP-COM-FUL-020-04 BR-CAP-COM-FUL-020-05
Preconditions
A job has completed validation.
Steps
Repeat submission and apply with absent, wrong and correct digests.
Expected
Replay identifies the same job, invalid digests fail and the correct digest permits queued execution.
Data
Fixtures for job replay and impact digest protect application.
Bound to
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#answers a second submission of the same body under the same Idempotency-Key with the same job, reused
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#answers the same job the second time, reused, with one row in the idempotency ledger
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#refuses an apply that echoes no impact digest, impact_digest_required
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#refuses an apply that echoes a digest other than the validation recorded, impact_digest_mismatch
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#applies the validated job echoing its digest: queued, one batch on the queue table for the dispatcher
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#validates without writing: the submission validating, its one batch run, the job validated with its impact one create
Source
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#answers a second submission of the same body under the same Idempotency-Key with the same job, reused
03 Job visibility preserves caller and collection boundariespermissionapinegativetest
Proves
BR-CAP-COM-FUL-020-06
Preconditions
Two people submitted jobs in two collections.
Steps
List as each, read across collections and submit the wrong record type.
Expected
Bulk authority sees its collection's jobs, other callers see their own and collection mismatches fail.
Data
Fixtures for job visibility preserves caller and collection boundaries.
Bound to
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#lists every job of the collection for a caller holding its bulk key, and no job of another collection
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#lists only the jobs a caller submitted themselves when they lack the collection’s bulk key
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#answers a job of another collection as not found through this collection’s scope
Source
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#lists every job of the collection for a caller holding its bulk key, and no job of another collection
04 Initial import requires the loading lifecycleboundaryapinegativetest
Proves
BR-CAP-COM-FUL-020-07
Preconditions
One workspace is live and another is loading.
Steps
Submit initial imports to both and call an ordinary route while loading.
Expected
Live import fails, loading import succeeds and ordinary routes remain closed.
Data
Fixtures for initial import requires the loading lifecycle.
Bound to
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#refuses the ordinary store routes, 403 TenantUnavailable
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#keeps serving the data-job routes: the engine’s surface is what the load is made of
Source
services-commerce:modules/data-operations/tests/integration/services/jobs/data-jobs.integration.spec.js#is refused for a tenant that is live
05 Worker replay preserves submitter authority and batch identityfailureapinegativetest
Proves
BR-CAP-COM-FUL-020-08
Preconditions
A batch is queued and its submitter can lose authority.
Steps
Deliver twice, deliver unreadable input and deliver after revocation.
Expected
Valid work applies once, unreadable input is dead-lettered and revoked authority fails the job.
Data
Fixtures for worker replay preserves submitter authority and batch identity.
Bound to
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#claims the one batch, publishes one message naming the tenant, the job and the batch, and deletes the queue row
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#runs the batch as the submitter, applies its item and acknowledges the message
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#applies nothing on a second delivery of the same message, and acknowledges it still
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#is reported unreadable and left for the dead-letter queue, never retried as work
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#acknowledges the message as access_revoked and fails the job whole with that code, nothing left on the queue
Source
services-commerce:modules/data-operations/tests/integration/services/queue/data-job-worker.integration.spec.js#claims the one batch, publishes one message naming the tenant, the job and the batch, and deletes the queue row
06 Error classification preserves safe dependency informationfailureunitnegativetest
Proves
BR-CAP-COM-FUL-020-09
Preconditions
Representative writes fail through each supported error type.
Steps
Classify missing references, typed refusals, invalid values, duplicates and reset connections.
Expected
Classification preserves dependency fields and stable codes, reports only constraint names for collisions and treats resets as transient.
Data
Fixtures for error classification preserves safe dependency information.
Bound to
services-commerce:modules/data-operations/tests/unit/operations/error-classification.spec.js#blocks an item whose reference nobody has loaded, on the engine’s dependency_missing, at the field that names it
services-commerce:modules/data-operations/tests/unit/operations/error-classification.spec.js#names a unique violation by its constraint alone, never by the colliding value
services-commerce:modules/data-operations/tests/unit/operations/error-classification.spec.js#reports a connection reset as a transient systemic failure, and an unknown error as one that is not
services-commerce:modules/data-operations/tests/integration/services/operations/catalog-import.integration.spec.js#blocks a listing whose product nothing has loaded as dependency_missing, naming the product source key, and writes nothing
Source
services-commerce:modules/data-operations/tests/unit/operations/error-classification.spec.js#blocks an item whose reference nobody has loaded, on the engine’s dependency_missing, at the field that names it
07 Source-key readback preserves imported shape and scopeboundaryapinegativetest
Proves
BR-CAP-COM-FUL-020-10
Preconditions
Store source keys belong to one workspace.
Steps
Read before and after application and from another workspace.
Expected
Missing keys are reported before loading, imported shapes appear afterward and other workspaces see no match.
Data
Fixtures for source-key readback preserves imported shape and scope.
Bound to
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#answers the key missing before the apply, and the store as its load carried it once the job is applied and run
services-commerce:modules/data-operations/tests/integration/services/operations/configuration-imports.integration.spec.js#reads a load back by its keys, each store exactly as its GET answers it, the keys nothing loaded missing, in the order asked
services-commerce:modules/data-operations/tests/integration/services/operations/configuration-imports.integration.spec.js#answers nothing for the same keys in another tenant: the crosswalk is the tenant’s own
Source
services-commerce:modules/data-operations/tests/e2e/data-jobs.e2e.spec.js#answers the key missing before the apply, and the store as its load carried it once the job is applied and run
08 Historical order opening retains delivered and waiting worktransitionapinegativetest
Proves
BR-CAP-COM-FUL-020-11
Preconditions
A migrated order has fulfilled and unfulfilled lines.
Steps
Import it, repeat insertion and later relink the known invoice source.
Expected
The order is accepted, billed and migrated with completed and blocked obligations, duplicate insertion fails and relinking uses the existing source identity.
Data
Fixtures for historical order opening retains delivered and waiting work.
Bound to
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#writes the order with its 1.0 number, accepted at its placement, billed, and marked migrated
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#creates one obligation per item line in its final state: completed and open for the fulfilled line, blocked for the other
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#leaves the invoice link pending on the order.migrated event rather than blocking the order (D-C-04)
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#refuses the same key loaded again as that item’s invalid value, writing nothing
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#makes the pending link under the idempotency key the first write would have used
Source
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#writes the order with its 1.0 number, accepted at its placement, billed, and marked migrated
09 Stock import opens balances through movementsinvariantapinegativetest
Proves
BR-CAP-COM-FUL-020-12
Preconditions
Prepared mug and cap records describe historical stock.
Steps
Import them, repeat a key and use an inactive destination.
Expected
Ledger opening records count and damage, while repeated identity and inactive location fail.
Data
Fixtures for stock import opens balances through movements.
Bound to
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the mug’s item through the ledger: a count correction of twelve and a damage of two, so the trigger holds ten available
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the cap’s item under the product’s own SKU at the default location, with no movement for a count of nought
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#refuses the same key loaded again as that item’s invalid value, moving nothing
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#refuses an item at an inactive location as that item’s refusal, as the implicit creation would
Source
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the mug’s item through the ledger: a count correction of twelve and a damage of two, so the trigger holds ten available
10 Imported opening stock participates in the normal ledgerinteractionapitest
Proves
BR-CAP-COM-FUL-020-12 BR-CAP-COM-FUL-017-03
Preconditions
An implementation workspace has a migrated warehouse, location and product source identity.
Steps
Import twelve units with two damaged, read back the source key and inspect live balances and movements.
Expected
The item has ten available units, backed by count and damage entries; an inactive destination refuses a new item.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Bound to
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the mug’s item through the ledger: a count correction of twelve and a damage of two, so the trigger holds ten available
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the cap’s item under the product’s own SKU at the default location, with no movement for a count of nought
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#refuses the same key loaded again as that item’s invalid value, moving nothing
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#refuses an item at an inactive location as that item’s refusal, as the implicit creation would
Source
services-commerce:modules/data-operations/tests/integration/services/operations/inventory-import.integration.spec.js#opens the mug’s item through the ledger: a count correction of twelve and a damage of two, so the trigger holds ten available,services-commerce:modules/inventory/tests/integration/db/inventory-tables.table.integration.spec.js#refuses the application role a balance: UPDATE on on_hand is 42501 (the column grant), while its settings are its to change,services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list and read everything, and refuses it every write 403 permission_missing
11 Migrated delivery remains distinguishable from new waiting workinteractionapiproposed
Proves
BR-CAP-COM-FUL-020-11 BR-CAP-COM-FUL-002-02 BR-CAP-COM-FUL-004-10
Preconditions
A historical order contains one delivered item and one undelivered item.
Steps
Import the order and inspect its two obligations; evaluate the undelivered line.
Expected
Imported delivery remains completed while the undelivered migrated line remains blocked for staff.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Source
services-commerce:modules/data-operations/tests/integration/services/operations/order-import.integration.spec.js#writes the order with its 1.0 number, accepted at its placement, billed, and marked migrated,services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#blocks for a person exactly when the reason is a hold, a migrated line, a missing approval or a prerequisite that failed, and never otherwise,services-commerce:modules/fulfillment/tests/integration/db/register-tables.table.integration.spec.js#refuses pending to authorized, authorized to pending, failed to completed and completed to anything but superseded (RHC02)

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.