From c08deaff337e7813a5dc8390ce3387a3965321cf Mon Sep 17 00:00:00 2001 From: TheMilek Date: Thu, 20 Apr 2023 15:42:01 +0200 Subject: [PATCH 1/2] Cover Api steps in paying offline during checkout as guest scenario --- .../paying_offline_during_checkout_as_guest.feature | 10 +++++++++- .../config/suites/api/checkout/paying_for_order.yml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/features/checkout/paying_for_order/paying_offline_during_checkout_as_guest.feature b/features/checkout/paying_for_order/paying_offline_during_checkout_as_guest.feature index 0549d58c46..1c2b35f6f1 100644 --- a/features/checkout/paying_for_order/paying_offline_during_checkout_as_guest.feature +++ b/features/checkout/paying_for_order/paying_offline_during_checkout_as_guest.feature @@ -20,9 +20,17 @@ Feature: Paying Offline during checkout as guest And I confirm my order Then I should see the thank you page - @ui + @ui @no-api Scenario: Successfully placing an order using custom locale Given I have product "PHP T-Shirt" in the cart When I proceed through checkout process in the "French (France)" locale with email "john@example.com" And I confirm my order Then I should see the thank you page in "French (France)" + + @api @no-ui + Scenario: Successfully placing an order using custom locale + Given I pick up cart in the "French (France)" locale + And I add product "PHP T-Shirt" to the cart + When I proceed through checkout process + And I confirm my order + Then my order's locale should be "French (France)" diff --git a/src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml b/src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml index 85df5a38bc..80285b78ac 100644 --- a/src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml +++ b/src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml @@ -12,6 +12,7 @@ default: - sylius.behat.context.transform.channel - sylius.behat.context.transform.country - sylius.behat.context.transform.lexical + - sylius.behat.context.transform.locale - sylius.behat.context.transform.payment - sylius.behat.context.transform.product - sylius.behat.context.transform.shared_storage From 4db15ff6cd2ae58ab6cad8920dcc20c26910d344 Mon Sep 17 00:00:00 2001 From: TheMilek Date: Fri, 21 Apr 2023 08:10:15 +0200 Subject: [PATCH 2/2] [ECS] Fix --- src/Sylius/Component/Core/Model/Order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sylius/Component/Core/Model/Order.php b/src/Sylius/Component/Core/Model/Order.php index 8d91e39043..cf1981e624 100644 --- a/src/Sylius/Component/Core/Model/Order.php +++ b/src/Sylius/Component/Core/Model/Order.php @@ -345,7 +345,7 @@ class Order extends BaseOrder implements OrderInterface static function (int $subtotal, OrderItemInterface $item): int { return $subtotal + $item->getSubtotal(); }, - 0 + 0, ); }