fix: keep unconfirmed candidates in rectification
This commit is contained in:
@@ -118,6 +118,8 @@ test("ready completion is explicit and terminal low has no finish mutation", ()
|
||||
assert.doesNotMatch(hookSource, /turn\.nextAction\.kind === "ready"\) onReady/);
|
||||
assert.match(candidateSource, /acknowledgeReady/);
|
||||
assert.doesNotMatch(candidateSource, /controller\.finish/);
|
||||
assert.doesNotMatch(hookSource, /completeGuidedBirthTimeCandidate/);
|
||||
assert.doesNotMatch(hookSource, /completeCandidate:/);
|
||||
});
|
||||
|
||||
test("unconfirmed terminal candidates preserve the range without offering direct adoption", () => {
|
||||
|
||||
@@ -47,16 +47,17 @@ test("birth time intake requires only the fields selected by the source", () =>
|
||||
assert.equal(isBirthTimeDraftReady({ ...emptyDraft, birthTimeSource: "unknown" }), true);
|
||||
});
|
||||
|
||||
test("a persisted candidate working time can leave rectification onboarding", () => {
|
||||
test("an unconfirmed candidate working time remains in rectification onboarding", () => {
|
||||
const candidate = {
|
||||
...emptyDraft,
|
||||
time: "04:53",
|
||||
birthTimeStatus: "candidate",
|
||||
} satisfies BirthTimeDraft;
|
||||
|
||||
assert.equal(isBirthTimeReadyForConsultation(candidate), true);
|
||||
assert.equal(isBirthTimeReadyForConsultation(candidate), false);
|
||||
assert.equal(isBirthTimeReadyForConsultation({ ...candidate, time: "" }), false);
|
||||
assert.equal(isBirthTimeReadyForConsultation({ ...candidate, birthTimeStatus: "rectifying" }), false);
|
||||
assert.equal(isBirthTimeReadyForConsultation({ ...candidate, birthTimeStatus: "confirmed" }), true);
|
||||
});
|
||||
|
||||
test("a persisted candidate working time takes precedence over the reported range", () => {
|
||||
|
||||
Reference in New Issue
Block a user