Skip to content

ATS-CRM-DQ-012Prepare a merge and choose its survivor: Capability Test Specification

Markdown

ATS-CRM-DQ-012

Prepare a merge and choose its survivor: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-DQ-012

Design

Executed by
TST-CRM-DQ-176, TST-CRM-DQ-181, TST-CRM-DQ-183

KindAcceptance test setProduct areaCRMModuleDuplicate Review and Record MergingRevision1

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation gap: FND-CRM-DQ-063
  • Permission covered
  • Edge gap: FND-CRM-DQ-063
  • Failure gap: FND-CRM-DQ-063
  • Boundary covered
  • Concurrency gap: FND-CRM-DQ-063
  • Invariant covered
  • Interaction covered

Test Scenarios

18 scenarios proving CAP-CRM-DQ-012; 8 bound to an existing test.

01 Participant validation prevents invalid plansboundaryapinegativetest
Proves
BR-CAP-CRM-DQ-012-01
Preconditions
Prepare workspace records and an absorbed identity.
Steps
Try one participant, eleven, a repeat, an outside survivor and the absorbed record.
Expected
Invalid selections fail and the absorbed participant reports its survivor.
Data
The existing scenario setup supplies the required records.
Bound to
Source
services-crm:modules/merges/tests/integration/services/persistence/record-merge-plans.integration.spec.js#refuses a plan of one record, which is not a merge, as ObjectInvalid naming the field
02 Plan authority requires the type's complete permission pairpermissionapinegativetest
Proves
BR-CAP-CRM-DQ-012-02
Preconditions
Prepare contact-only authority, organization merge-only, read-only and merge-without-read callers.
Steps
Request contact and organization plans.
Expected
Every incomplete type-specific read-and-merge pair is refused.
Data
The existing scenario setup supplies the required records.
Bound to
Source
services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#refuses the plan to a caller who may merge contacts but not organizations
03 Survivor ranking explains the winning signalruleunittest
Proves
BR-CAP-CRM-DQ-012-03 BR-CAP-CRM-DQ-012-05
Preconditions
Prepare participants distinguished by login, integration identity, inbound references and creation age.
Steps
Compute the recommendation.
Expected
Signals apply in that order, reasons use record names, age-only ranking is weak and recency or completeness does not win.
Data
The existing scenario setup supplies the required records.
Bound to
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#keeps the only participant an integration addresses, when no login separates them
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#keeps the participant the most rows outside the merge name, when no identity separates them
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#keeps the record created first, when nothing else separates them
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#is not decisive when the top two are still level after the references rule
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#never keeps the newest record, whatever it holds beyond the rules
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#never hands a reader a record id, the records being named by their names instead
Source
services-crm:modules/merges/tests/unit/services/planning/survivor-recommendation.spec.js#keeps the only participant a portal login names
04 Administrators can override the survivor suggestionruleapitest
Proves
BR-CAP-CRM-DQ-012-04
Preconditions
A named participant differs from the recommendation.
Steps
Create plans with and without an explicit survivor.
Expected
The named selection remains, while omission uses the recommendation.
Data
The existing scenario setup supplies the required records.
Bound to
Source
services-crm:modules/merges/tests/integration/services/merges/survivor-recommendation.integration.spec.js#leaves the survivor the request named alone, the recommendation being advisory
05 Participant changes preserve only applicable decisionstransitionapitest
Proves
BR-CAP-CRM-DQ-012-08
Preconditions
A three-record plan holds decisions.
Steps
Remove one participant and read again after data changes.
Expected
Two participants remain and invalidated decisions are removed with explanations.
Data
The existing scenario setup supplies the required records.
Bound to
Source
services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#answers the change with the two records that are left, in record_ids and in records
06 The expiry sweep respects stored deadlinestransitionapitest
Proves
BR-CAP-CRM-DQ-012-10
Preconditions
Create overdue undecided and blocked plans, a completed plan and a ready plan whose stored deadline is later.
Steps
Run the sweep at a fixed time and repeat it.
Expected
The overdue undecided and blocked plans are expired; the completed and not-yet-due plans retain their standing; repetition expires nothing.
Data
The existing scenario setup supplies the required records.
Bound to
Source
services-crm:modules/merges/tests/integration/services/merges/merge-plan-expiry.integration.spec.js#expires the plan whose seven days are up, which is what takes it off the reader’s list
07 Queue launch displays survivor reasoninginteractionbrowsertest
Proves
BR-CAP-CRM-DQ-012-03 BR-CAP-CRM-DQ-012-04
Preconditions
Prepare groups with login, external-identity, reference and age distinctions.
Steps
Launch their plans from the queue.
Expected
The displayed recommendation and explanation follow the recorded ranking.
Data
The existing scenario setup supplies the required records.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/merging/CRM-ACC-0248.spec.ts#CRM-ACC-0248
08 Observe needs_decisions becoming expired after the expiry sweep finds an overdue working previewtransitionapiproposed
Proves
INV-DOM-CRM-DQ-003-12
Preconditions
Arrange needs_decisions standing with the transition guard satisfied: Only executed and already-expired plans are excluded.
Steps
The expiry sweep finds an overdue working preview.
Expected
Read the expired standing and inspect the associated changes: mark expiry and advance the version.
Data
Fixtures for needs_decisions, the guard and the affected records; a fixed clock for time-dependent changes.
Source
services-crm:modules/merges/tests/integration/services/merges/merge-plan-expiry.integration.spec.js#expires a blocked plan too, a plan nobody cleared being as abandoned as one nobody decided
09 Observe ready becoming expired after the expiry sweep finds an overdue ready previewtransitionapiproposed
Proves
INV-DOM-CRM-DQ-003-12
Preconditions
Arrange ready standing with the transition guard satisfied: Only executed and already-expired plans are excluded.
Steps
The expiry sweep finds an overdue ready preview.
Expected
Read the expired standing and inspect the associated changes: mark expiry.
Data
Fixtures for ready, the guard and the affected records; a fixed clock for time-dependent changes.
Source
services-crm:modules/merges/tests/integration/services/merges/merge-plan-expiry.integration.spec.js#expires a blocked plan too, a plan nobody cleared being as abandoned as one nobody decided
10 Observe blocked becoming expired after the expiry sweep finds an overdue blocked previewtransitionapiproposed
Proves
INV-DOM-CRM-DQ-003-12
Preconditions
Arrange blocked standing with the transition guard satisfied: Only executed and already-expired plans are excluded.
Steps
The expiry sweep finds an overdue blocked preview.
Expected
Read the expired standing and inspect the associated changes: mark expiry.
Data
Fixtures for blocked, the guard and the affected records; a fixed clock for time-dependent changes.
Source
services-crm:modules/merges/tests/integration/services/merges/merge-plan-expiry.integration.spec.js#expires a blocked plan too, a plan nobody cleared being as abandoned as one nobody decided
11 Observe executing becoming expired after the expiry sweep finds an overdue active attempt’s plantransitionapiproposed
Proves
INV-DOM-CRM-DQ-003-12
Preconditions
Arrange executing standing with the transition guard satisfied: Executing standing is not excluded by the sweep.
Steps
The expiry sweep finds an overdue active attempt’s plan.
Expected
Read the expired standing and inspect the associated changes: mark expiry while the attempt may still execute.
Data
Fixtures for executing, the guard and the affected records; a fixed clock for time-dependent changes.
Source
services-crm:modules/merges/services/persistence/record-merge-plans.ts:expireRecordMergePlans
12 Invalid participant lists cannot create a previewinvariantapiproposed
Proves
INV-DOM-CRM-DQ-003-01
Preconditions
Lists of one and eleven records, a repeated record and an outside survivor.
Steps
Create each proposed plan and inspect saved previews.
Expected
Every invalid list is refused without a saved plan.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Source
services-crm:modules/merges/services/persistence/record-merge-plans.ts:createRecordMergePlan; modules/merges/db/record-merge-plans.table.ts:record_merge_plans_record_ids_check
13 A preview and its material hash cannot be stored separatelyinvariantapiproposed
Proves
INV-DOM-CRM-DQ-003-02
Preconditions
Direct plan rows containing only a computed preview or only its hash.
Steps
Attempt each incomplete database insert.
Expected
Both inserts are refused by the database.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Source
services-crm:modules/merges/db/record-merge-plans.table.ts:record_merge_plans_plan_hash_check
14 A settled preview refuses another editinvariantapiproposed
Proves
INV-DOM-CRM-DQ-003-06
Preconditions
Plans in executing, executed and expired standing.
Steps
Try an answer or participant edit at the current version of each plan.
Expected
Every edit is refused and the stored preview stays unchanged.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Source
services-crm:modules/merges/services/merges/merge-plans.ts:assertPlanIsOpen
15 Editing does not renew the stored expiry deadlineinvariantapiproposed
Proves
INV-DOM-CRM-DQ-003-12
Preconditions
A plan near its stored creation-based expiry deadline.
Steps
Edit the plan, read its deadline and sweep after that stored instant.
Expected
The deadline is unchanged and the sweep expires the edited plan.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Source
services-crm:modules/merges/services/persistence/record-merge-plans.ts:defaultExpiry, updateRecordMergePlan, expireRecordMergePlans
16 Authority for only the other record type cannot create a planinvariantapitest
Proves
INV-DOM-CRM-DQ-003-13
Preconditions
A context qualified for contact merging and an organization participant list.
Steps
Create the organization plan with the contact context.
Expected
The route refuses the plan before saving it.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Bound to
Source
services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#refuses the plan to a caller who may merge contacts but not organizations
17 A preview remains inaccessible in another workspaceinvariantapiproposed
Proves
INV-DOM-CRM-DQ-003-14
Preconditions
A saved plan and a current-version edit attempted through a different workspace.
Steps
Read and update the plan using the other workspace context.
Expected
The plan is unavailable and its records remain unchanged.
Data
Records, versions and caller contexts owned by the run; transaction failure injection when the invariant concerns rollback.
Source
services-crm:db/row-level-security.ts (record_merge_plans forced workspace policy)
18 Participant selection changes preview decisions before executioninteractionapiproposed
Proves
BR-CAP-CRM-DQ-012-01 BR-CAP-CRM-DQ-012-02 BR-CAP-CRM-DQ-012-03 BR-CAP-CRM-DQ-012-05 BR-CAP-CRM-DQ-012-04 BR-CAP-CRM-DQ-012-08 BR-CAP-CRM-DQ-012-10
Preconditions
Run-owned contact and organization records, the relevant staff permissions and the related state described by the sequence.
Steps
Launch from a record, choose a different survivor, answer a conflict, remove a participant and execute the refreshed preview.
Expected
The plan retains only applicable decisions and execution uses the latest reviewed participants.
Data
An isolated workspace with related records and fixed timestamps; owned participant failure injection where requested.
Source
CAP-CRM-DQ-012; CAP-CRM-DQ-010; CAP-CRM-DQ-013; CAP-CRM-DQ-016; WF-CRM-DQ-005; WF-CRM-DQ-007

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.