fix: remove duplicate saved choice block
This commit is contained in:
parent
5142ff30db
commit
a867bf5464
|
|
@ -67,11 +67,11 @@ export const DeliveryChoiceFlow = ({
|
|||
const selectionCard = (
|
||||
<div className="space-y-3 rounded-[22px] border border-[var(--color-border)] bg-[var(--color-surface-strong)] p-4">
|
||||
<p className="text-sm uppercase tracking-[0.18em] text-[var(--color-text-muted)]">
|
||||
{isChoiceSaved ? "Сохранённый выбор" : "Выбранный слот"}
|
||||
Выбранный слот
|
||||
</p>
|
||||
{slotSummary ? (
|
||||
{slotSummary && !isChoiceSaved ? (
|
||||
<p className="text-sm leading-6">
|
||||
<span className="font-medium">{isChoiceSaved ? "Сохранено:" : "Выбрано:"}</span> {slotSummary}
|
||||
<span className="font-medium">Выбрано:</span> {slotSummary}
|
||||
</p>
|
||||
) : (
|
||||
<p className="text-sm leading-6 text-[var(--color-text-muted)]">
|
||||
|
|
@ -84,7 +84,6 @@ export const DeliveryChoiceFlow = ({
|
|||
if (!isActive) {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{slotSummary ? selectionCard : null}
|
||||
<DeliveryStateNotice state={state} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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("Сохранить");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue