From eb2cec1ad25648a5b6a74f280c64fa14d7b01e14 Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Mon, 30 Sep 2024 13:41:24 +0200 Subject: [PATCH 1/2] Add localization to live components --- config/routes/ux_live_component.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/routes/ux_live_component.yaml b/config/routes/ux_live_component.yaml index e56523abfb..88b1ff0e0e 100644 --- a/config/routes/ux_live_component.yaml +++ b/config/routes/ux_live_component.yaml @@ -1,5 +1,3 @@ live_component: resource: '@LiveComponentBundle/config/routes.php' - prefix: '/_components' - # adjust prefix to add localization to your components - #prefix: '/{_locale}/_components' + prefix: '/{_locale}/_components' From d61a8e476ad13a88f0d9afb9b42f1092e3535928 Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Mon, 30 Sep 2024 13:41:29 +0200 Subject: [PATCH 2/2] Enable tests for placing an orders in chosen locale --- ...ceiving_confirmation_email_after_completing_checkout.feature | 2 +- .../checkout/seeing_order_summary/seeing_order_locale.feature | 2 +- .../Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/shop/checkout/receiving_confirmation_email_after_completing_checkout.feature b/features/shop/checkout/receiving_confirmation_email_after_completing_checkout.feature index 868b5cfe4d..1885d3afae 100644 --- a/features/shop/checkout/receiving_confirmation_email_after_completing_checkout.feature +++ b/features/shop/checkout/receiving_confirmation_email_after_completing_checkout.feature @@ -19,7 +19,7 @@ Feature: Receiving confirmation email after finalizing checkout When I confirm my order Then an email with the summary of order placed by "john@example.com" should be sent to him - @api @todo-ui @javascript @email + @api @ui @javascript @email Scenario: Receiving confirmation email after finalizing checkout in different locale than the default one Given I have product "Sig Sauer P226" in the cart And I have proceeded through checkout process in the "Polish (Poland)" locale with email "john@example.com" diff --git a/features/shop/checkout/seeing_order_summary/seeing_order_locale.feature b/features/shop/checkout/seeing_order_summary/seeing_order_locale.feature index 625ba2d004..fac10113ec 100644 --- a/features/shop/checkout/seeing_order_summary/seeing_order_locale.feature +++ b/features/shop/checkout/seeing_order_summary/seeing_order_locale.feature @@ -19,7 +19,7 @@ Feature: Seeing order locale on order summary page Then I should be on the checkout summary step And my order's locale should be "English (United States)" - @no-api @todo-ui @javascript + @no-api @ui @javascript Scenario: Seeing order locale on the order summary page after change channel locale Given I have product "Stark T-Shirt" in the cart When I proceed through checkout process in the "French (France)" locale diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php index a8ec642f7a..e187980639 100644 --- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php +++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutCompleteContext.php @@ -90,7 +90,7 @@ final class CheckoutCompleteContext implements Context * @Then I should be on the checkout complete step * @Then I should be on the checkout summary step */ - public function iShouldBeOnTheCheckoutCompleteStep() + public function iShouldBeOnTheCheckoutCompleteStep(): void { $this->completePage->verify(); }