From 5e753f591a1d6d8b2274957e48cb5369c7e73063 Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Fri, 27 Sep 2024 09:44:07 +0200 Subject: [PATCH] [PaymentBundle] Minor improvements --- .../payment_request/browsing_payment_requests.feature | 2 +- .../payment_request/seeing_payment_request_details.feature | 2 +- src/Sylius/Behat/Context/Setup/PaymentContext.php | 2 +- .../Context/Ui/Admin/ManagingPaymentRequestsContext.php | 5 +---- .../Page/Admin/Payment/PaymentRequest/IndexPageInterface.php | 1 - .../config/app/twig_hooks/payment_request/show.yaml | 3 --- .../Bundle/AdminBundle/Resources/config/grids/payment.yml | 2 +- 7 files changed, 5 insertions(+), 12 deletions(-) diff --git a/features/admin/payment/managing_payments/payment_request/browsing_payment_requests.feature b/features/admin/payment/managing_payments/payment_request/browsing_payment_requests.feature index 3b53205378..84df289684 100644 --- a/features/admin/payment/managing_payments/payment_request/browsing_payment_requests.feature +++ b/features/admin/payment/managing_payments/payment_request/browsing_payment_requests.feature @@ -18,7 +18,7 @@ Feature: Browsing payment requests @api @ui Scenario: Browsing payment requests of a payment When I browse payments - And I want to view the payment request of the first payment + And I want to view the payment requests of the first payment Then there should be 3 payment requests on the list And it should be the payment request with action "authorize" And it should be the payment request with action "capture" diff --git a/features/admin/payment/managing_payments/payment_request/seeing_payment_request_details.feature b/features/admin/payment/managing_payments/payment_request/seeing_payment_request_details.feature index f51af8331a..a1af8f9f26 100644 --- a/features/admin/payment/managing_payments/payment_request/seeing_payment_request_details.feature +++ b/features/admin/payment/managing_payments/payment_request/seeing_payment_request_details.feature @@ -1,5 +1,5 @@ @managing_payments -Feature: Seeing payment request details +Feature: Seeing payment request's details In order to have an overview of one of payment requests As an Administrator I want to be able to see its details diff --git a/src/Sylius/Behat/Context/Setup/PaymentContext.php b/src/Sylius/Behat/Context/Setup/PaymentContext.php index 2de4188c42..e5d3b91e73 100644 --- a/src/Sylius/Behat/Context/Setup/PaymentContext.php +++ b/src/Sylius/Behat/Context/Setup/PaymentContext.php @@ -127,7 +127,7 @@ final readonly class PaymentContext implements Context /** * @Given the store has :paymentMethodName payment method not assigned to any channel */ - public function theStoreHasPaymentMethodNotAssignedToAnyChannel($paymentMethodName): void + public function theStoreHasPaymentMethodNotAssignedToAnyChannel(string $paymentMethodName): void { $this->createPaymentMethod($paymentMethodName, 'PM_' . $paymentMethodName, 'Offline', 'Payment method', false); } diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentRequestsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentRequestsContext.php index 22e7ee7245..cc74e4ffc9 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentRequestsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentRequestsContext.php @@ -84,10 +84,7 @@ final readonly class ManagingPaymentRequestsContext implements Context */ public function thereShouldBeProductVariantsOnTheList(int $count): void { - Assert::same( - $this->indexPage->countItems(), - $count, - ); + Assert::same($this->indexPage->countItems(), $count); } /** diff --git a/src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/IndexPageInterface.php b/src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/IndexPageInterface.php index 348607d720..2aa4f49da1 100644 --- a/src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/IndexPageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/IndexPageInterface.php @@ -22,5 +22,4 @@ interface IndexPageInterface extends BaseIndexPageInterface public function chooseActionToFilter(string $action): void; public function chooseStateToFilter(string $state): void; - } diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/payment_request/show.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/payment_request/show.yaml index 0fc8760724..731c453478 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/payment_request/show.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/payment_request/show.yaml @@ -33,6 +33,3 @@ twig_hooks: template: '@SyliusAdmin/payment_request/show/content/sections/general/created_at.html.twig' updated_at: template: '@SyliusAdmin/payment_request/show/content/sections/general/updated_at.html.twig' - - - diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/grids/payment.yml b/src/Sylius/Bundle/AdminBundle/Resources/config/grids/payment.yml index 3d72df10f9..48567073b3 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/grids/payment.yml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/grids/payment.yml @@ -69,7 +69,7 @@ sylius_grid: class: "%sylius.model.channel.class%" actions: item: - show_payment_requests: + list_payment_requests: type: show icon: list_letters label: sylius.ui.list_payment_requests