test(client): актуализировать ожидания DeliveryChoiceFlow (устаревшие тексты) + кейс самовывоза

This commit is contained in:
Hermes 2026-09-28 12:28:55 +02:00
parent 8e99bd1f32
commit 52c8f16a74
1 changed files with 17 additions and 2 deletions

View File

@ -19,10 +19,24 @@ describe("DeliveryChoiceFlow", () => {
expect(markup).toContain("Выберите время доставки");
expect(markup).toContain("Сохранить");
expect(markup).toContain("Ожидает ответа клиента");
expect(markup).toContain("Согласование доставки");
expect(markup).not.toContain("Запросить новую ссылку");
});
it("для самовывоза говорит про самовывоз", () => {
const markup = renderToStaticMarkup(
<DeliveryChoiceFlow
invitation={{ state: "awaiting_choice", orderNumber: "CD-240031" }}
deliveryType="pickup"
onConfirmChoice={() => {}}
/>,
);
expect(markup).toContain("Согласование самовывоза");
expect(markup).toContain("Выберите время самовывоза");
expect(markup).toContain("Доставка CD-240031");
});
it("renders a disabled save action when nothing is selected", () => {
const markup = renderToStaticMarkup(
<DeliveryChoiceFlow
@ -105,7 +119,8 @@ describe("OrderCompositionPanel", () => {
);
expect(markup).toContain("Состав заказа");
expect(markup).toContain("3 поз.");
// в заголовке панели считается число счетов, а не позиций (1 счёт)
expect(markup).toContain("1 счёт");
});
it("renders nothing when there are no order items", () => {