Test Scenarios
22 scenarios proving CAP-CRM-DQ-013; 14 bound to an existing test.
02 Default selection explains its rankingruleapitest
- Proves
BR-CAP-CRM-DQ-013-03 - Preconditions
- Prepare survivor-held values, a survivor gap with a majority and a gap without a majority.
- Steps
- Build previews.
- Expected
- Defaults select the survivor, then explain the majority count or latest field change.
- Data
- The existing scenario setup supplies the required records.
- Bound to
- Source
- services-crm:modules/merges/tests/unit/services/planning/contact-fields.spec.js#is a conflict defaulting to the survivor's value when two participants differ
03 Required unanswered questions prevent executiontransitionapinegativetest
- Proves
BR-CAP-CRM-DQ-013-04 - Preconditions
- A plan contains an open required conflict.
- Steps
- Request execution.
- Expected
- The plan needs decisions and execution reports not ready.
- Data
- The existing scenario setup supplies the required records.
- Bound to
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#plans it as needing a decision rather than ready
04 Decision updates merge and clear independentlyinvariantapitest
- Proves
BR-CAP-CRM-DQ-013-05 - Preconditions
- A preview contains two questions.
- Steps
- Answer each separately, clear one and then try answering and clearing together.
- Expected
- Answers accumulate, clearing affects only its question and the conflicting request fails.
- Data
- The existing scenario setup supplies the required records.
- Bound to
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#keeps the first answer when the second request answers only the other conflict
05 Unknown resolution leaves the saved plan intactvalidationapinegativetest
- Proves
BR-CAP-CRM-DQ-013-06 - Preconditions
- An existing plan has earlier answers.
- Steps
- Submit an answer for an unavailable question.
- Expected
- The refusal identifies the invalid resolution and preserves earlier answers.
- Data
- The existing scenario setup supplies the required records.
- Bound to
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#refuses it as an invalid resolution rather than storing a decision nobody can apply
09 Validation returns the current previewtransitionapitest
- Proves
BR-CAP-CRM-DQ-013-12 - Preconditions
- An open plan already holds decisions.
- Steps
- Request explicit validation.
- Expected
- The service returns the recomputed plan for current records.
- Data
- The existing scenario setup supplies the required records.
- Bound to
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#answers the validation with the plan as it is now, ready to execute
11 Observe needs_decisions becoming ready after answers or current data remove the last required questiontransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-04 - Preconditions
- Arrange needs_decisions standing with the transition guard satisfied: Changes use a current version and valid participant choices.
- Steps
- Answers or current data remove the last required question.
- Expected
- Read the ready standing and inspect the associated changes: persist refreshed preview, material hash and standing.
- Data
- Fixtures for needs_decisions, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#refuses the execution request as a plan that is not ready
12 Observe ready becoming needs_decisions after changed participants or data introduce an unanswered questiontransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-12 - Preconditions
- Arrange ready standing with the transition guard satisfied: Recomputation discovers the new conflict.
- Steps
- Changed participants or data introduce an unanswered question.
- Expected
- Read the needs_decisions standing and inspect the associated changes: persist the recomputed preview; report decisions that no longer apply.
- Data
- Fixtures for ready, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/unit/services/planning/merge-decisions.spec.js#is dropped and reported when the plan is simply read again after the data moved on
13 Observe ready becoming blocked after current planning discovers a blocking conditiontransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-12 INV-DOM-CRM-DQ-003-08 - Preconditions
- Arrange ready standing with the transition guard satisfied: Recomputation identifies a blocker.
- Steps
- Current planning discovers a blocking condition.
- Expected
- Read the blocked standing and inspect the associated changes: persist the blocked preview.
- Data
- Fixtures for ready, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/unit/services/planning/merge-decisions.spec.js#blocks the merge for a column the registry declares no policy for
14 Observe blocked becoming ready after a blocking condition clears and no required question remainstransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-12 INV-DOM-CRM-DQ-003-08 - Preconditions
- Arrange blocked standing with the transition guard satisfied: No blocker or required unanswered conflict remains.
- Steps
- A blocking condition clears and no required question remains.
- Expected
- Read the ready standing and inspect the associated changes: persist the ready preview.
- Data
- Fixtures for blocked, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#answers the validation with the plan as it is now, ready to execute
15 Observe needs_decisions becoming blocked after planning discovers a blocker before questions are settledtransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-12 INV-DOM-CRM-DQ-003-08 - Preconditions
- Arrange needs_decisions standing with the transition guard satisfied: Recomputation identifies a blocker.
- Steps
- Planning discovers a blocker before questions are settled.
- Expected
- Read the blocked standing and inspect the associated changes: persist the blocked preview.
- Data
- Fixtures for needs_decisions, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/unit/services/planning/merge-decisions.spec.js#blocks the merge for a column the registry declares no policy for
16 Observe blocked becoming needs_decisions after a blocker clears while unanswered questions remaintransitionapiproposed
- Proves
BR-CAP-CRM-DQ-013-12 INV-DOM-CRM-DQ-003-08 - Preconditions
- Arrange blocked standing with the transition guard satisfied: Recomputation still needs a required answer.
- Steps
- A blocker clears while unanswered questions remain.
- Expected
- Read the needs_decisions standing and inspect the associated changes: persist the preview awaiting decisions.
- Data
- Fixtures for blocked, the guard and the affected records; a fixed clock for time-dependent changes.
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#answers the validation with the plan as it is now, ready to execute
17 A stale answer preserves both saved decisionsinvariantapitest
- Proves
INV-DOM-CRM-DQ-003-03 - Preconditions
- A plan already changed by another administrator.
- Steps
- Submit an answer at the earlier version and read the saved plan.
- Expected
- The refusal leaves the current version and both decisions unchanged.
- 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/integration/services/merges/merge-plan-decisions.integration.spec.js#leaves both decisions on the plan, at the version it was refused against
18 A second answer retains the first answerinvariantapitest
- Proves
INV-DOM-CRM-DQ-003-04 - Preconditions
- A plan with two answerable conflicts.
- Steps
- Answer the first and then the second in a request naming only that conflict.
- Expected
- The plan contains both saved answers.
- 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#keeps the first answer when the second request answers only the other conflict
19 An optional field offers only retained source values or clearinginvariantunittest
- Proves
INV-DOM-CRM-DQ-003-05 - Preconditions
- A preview with two distinct values for one optional field.
- Steps
- Inspect available choices and submit an invented value.
- Expected
- The displayed choices are the participant values and clearing; the invented choice is refused.
- 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/unit/services/planning/contact-fields.spec.js#offers clearing the field as well as each value held
20 Validation returns the recomputed ready previewinvariantapitest
- Proves
INV-DOM-CRM-DQ-003-07 - Preconditions
- An open preview whose relevant source data has changed.
- Steps
- Validate and inspect the returned plan and saved preview.
- Expected
- The response reflects current records and its ready standing is persisted.
- 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#answers the validation with the plan as it is now, ready to execute
21 Choice recency uses field history before record ageruleapinegativeproposed
- Proves
BR-CAP-CRM-DQ-013-11 - Preconditions
- Two participants with conflicting values, only one carrying a captured change of that field.
- Steps
- Read the displayed timestamps and defaults, then repeat with neither participant carrying field history.
- Expected
- The history-backed choice reports its field-change instant; the fallback reports each record’s creation instant.
- Data
- Run-owned records and caller permissions that distinguish the two cases.
- Source
- services-crm:modules/merges/tests/e2e/merges.e2e.spec.js#says when each competing value last changed, so a reader can see which is freshest (gap G9)