From a867bf5464b85a18a77969fd3b6dc551423d32b2 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 16 Apr 2026 18:18:45 +0300 Subject: [PATCH] fix: remove duplicate saved choice block --- src/components/client/DeliveryChoiceFlow.jsx | 7 +++---- src/components/client/DeliveryChoiceFlow.test.jsx | 9 ++------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/client/DeliveryChoiceFlow.jsx b/src/components/client/DeliveryChoiceFlow.jsx index 0d4ce58..d2d5b79 100644 --- a/src/components/client/DeliveryChoiceFlow.jsx +++ b/src/components/client/DeliveryChoiceFlow.jsx @@ -67,11 +67,11 @@ export const DeliveryChoiceFlow = ({ const selectionCard = (

- {isChoiceSaved ? "Сохранённый выбор" : "Выбранный слот"} + Выбранный слот

- {slotSummary ? ( + {slotSummary && !isChoiceSaved ? (

- {isChoiceSaved ? "Сохранено:" : "Выбрано:"} {slotSummary} + Выбрано: {slotSummary}

) : (

@@ -84,7 +84,6 @@ export const DeliveryChoiceFlow = ({ if (!isActive) { return (

- {slotSummary ? selectionCard : null}
); diff --git a/src/components/client/DeliveryChoiceFlow.test.jsx b/src/components/client/DeliveryChoiceFlow.test.jsx index 85b3d73..6779413 100644 --- a/src/components/client/DeliveryChoiceFlow.test.jsx +++ b/src/components/client/DeliveryChoiceFlow.test.jsx @@ -54,19 +54,14 @@ describe("DeliveryChoiceFlow", () => { orderNumber: "CD-240031", customerName: "Мария Волкова", }} - selectedSlot={{ - date: "2026-04-14", - time: "До обеда", - }} isChoiceSaved onConfirmChoice={() => {}} onRequestNewLink={() => {}} />, ); - expect(markup).toContain("Сохранённый выбор"); - expect(markup).toContain("14.04.2026"); - expect(markup).toContain("До обеда"); + expect(markup).toContain("Доставка уже согласована"); + expect(markup).not.toContain("Выбранный слот"); expect(markup).not.toContain("Сохранить"); });