diff --git a/features/admin/being_redirected_to_previous_filtered_page.feature b/features/admin/being_redirected_to_previous_filtered_page.feature index 137315ae77..fbf1c814f0 100644 --- a/features/admin/being_redirected_to_previous_filtered_page.feature +++ b/features/admin/being_redirected_to_previous_filtered_page.feature @@ -20,7 +20,7 @@ Feature: Being redirected to previous filtered page And I delete the "FC Barcelona T-Shirt" product on filtered page Then I should be redirected to the previous page of only enabled products - @no-api @ui + @no-api @ui @mink:chromedriver Scenario: Being redirected to previous filtered page after cancelling editing a product When I browse products And I choose enabled filter @@ -29,7 +29,7 @@ Feature: Being redirected to previous filtered page And I cancel my changes Then I should be redirected to the previous page of only enabled products - @no-api @ui + @no-api @ui @mink:chromedriver Scenario: Being redirected to previous filtered page with pagination after cancelling editing a product When I browse products And I choose enabled filter @@ -39,7 +39,7 @@ Feature: Being redirected to previous filtered page And I cancel my changes Then I should be redirected to the 2nd page of only enabled products - @no-api @ui + @no-api @ui @mink:chromedriver Scenario: Being redirected to previous filtered page after cancelling creating a new product When I browse products And I choose enabled filter diff --git a/features/admin/payment/managing_payment_methods/being_redirected_to_previous_filtered_page.feature b/features/admin/payment/managing_payment_methods/being_redirected_to_previous_filtered_page.feature index fab20826f4..ff660f9ecd 100644 --- a/features/admin/payment/managing_payment_methods/being_redirected_to_previous_filtered_page.feature +++ b/features/admin/payment/managing_payment_methods/being_redirected_to_previous_filtered_page.feature @@ -11,11 +11,11 @@ Feature: Being redirected to previous filtered page And this payment method has been disabled And I am logged in as an administrator - @no-api @ui - Scenario: Being redirected to previous filtered page after cancelling creating a new payment method + @no-api @ui @mink:chromedriver + Scenario: Being redirected to previous filtered page after cancelling editing an existing payment method When I browse payment methods And I choose enabled filter And I filter - And I want to create a new offline payment method + And I want to modify the "Offline" payment method And I cancel my changes Then I should be redirected to the previous page of only enabled payment methods diff --git a/src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php index 652193d10a..e656cf760e 100644 --- a/src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php @@ -45,7 +45,7 @@ class UpdatePage extends SymfonyPage implements UpdatePageInterface public function cancelChanges(): void { - $this->getDocument()->find('css', '[data-test-cancel-changes-button]')->click(); + $this->getElement('back_button')->click(); } public function getValidationMessage(string $element): string @@ -89,10 +89,10 @@ class UpdatePage extends SymfonyPage implements UpdatePageInterface protected function getDefinedElements(): array { - return array_merge( - parent::getDefinedElements(), - ['form' => 'form'], - ); + return array_merge(parent::getDefinedElements(), [ + 'back_button' => '[data-test-cancel-changes-button]', + 'form' => 'form' + ]); } protected function waitForFormUpdate(): void