From 05d221b9fdde590cc69d24b815c3d92c7cfd16c5 Mon Sep 17 00:00:00 2001 From: jkindly Date: Tue, 10 Sep 2024 12:31:01 +0200 Subject: [PATCH] OP-515: Behat fix --- features/admin/adding_block.feature | 1 - features/admin/adding_page.feature | 1 - tests/Behat/Context/Ui/Admin/BlockContext.php | 8 -------- tests/Behat/Context/Ui/Admin/PageContext.php | 8 -------- tests/Behat/Page/Admin/Block/CreatePage.php | 5 ----- tests/Behat/Page/Admin/Block/CreatePageInterface.php | 2 -- tests/Behat/Page/Admin/Page/CreatePage.php | 5 ----- tests/Behat/Page/Admin/Page/CreatePageInterface.php | 2 -- 8 files changed, 32 deletions(-) diff --git a/features/admin/adding_block.feature b/features/admin/adding_block.feature index 29dd78df..c721508e 100644 --- a/features/admin/adding_block.feature +++ b/features/admin/adding_block.feature @@ -187,7 +187,6 @@ Feature: Adding blocks And I fill the code with "intro" And I fill the name with "Intro" And I select "Homepage" template - And I click button to use this template And I confirm that I want to use this template And I add it Then I should be notified that the block has been created diff --git a/features/admin/adding_page.feature b/features/admin/adding_page.feature index b6df542d..9f2881eb 100644 --- a/features/admin/adding_page.feature +++ b/features/admin/adding_page.feature @@ -217,7 +217,6 @@ Feature: Adding new page And I fill the slug with "my_page" And I fill the name with "My page" And I select "Homepage" template - And I click button to use this template And I confirm that I want to use this template And I add it Then I should be notified that the page has been created diff --git a/tests/Behat/Context/Ui/Admin/BlockContext.php b/tests/Behat/Context/Ui/Admin/BlockContext.php index 73000094..92224332 100755 --- a/tests/Behat/Context/Ui/Admin/BlockContext.php +++ b/tests/Behat/Context/Ui/Admin/BlockContext.php @@ -408,14 +408,6 @@ public function iSelectTemplate(string $templateName): void $this->resolveCurrentPage()->selectTemplate($templateName); } - /** - * @Then I click button to use this template - */ - public function iClickButtonToUseThisTemplate(): void - { - $this->resolveCurrentPage()->useTemplate(); - } - /** * @Then I confirm that I want to use this template */ diff --git a/tests/Behat/Context/Ui/Admin/PageContext.php b/tests/Behat/Context/Ui/Admin/PageContext.php index b84480f7..bf984a82 100755 --- a/tests/Behat/Context/Ui/Admin/PageContext.php +++ b/tests/Behat/Context/Ui/Admin/PageContext.php @@ -299,14 +299,6 @@ public function iSelectTemplate(string $templateName): void $this->resolveCurrentPage()->selectTemplate($templateName); } - /** - * @Then I click button to use this template - */ - public function iClickButtonToUseThisTemplate(): void - { - $this->resolveCurrentPage()->useTemplate(); - } - /** * @Then I confirm that I want to use this template */ diff --git a/tests/Behat/Page/Admin/Block/CreatePage.php b/tests/Behat/Page/Admin/Block/CreatePage.php index 9378e0f9..15531ab3 100755 --- a/tests/Behat/Page/Admin/Block/CreatePage.php +++ b/tests/Behat/Page/Admin/Block/CreatePage.php @@ -267,11 +267,6 @@ public function selectTemplate(string $templateName): void $item->click(); } - public function useTemplate(): void - { - $this->getDocument()->findLink('Use this template')->click(); - } - public function confirmUseTemplate(): void { $this->getDocument()->findById('load-template-confirmation-button')->click(); diff --git a/tests/Behat/Page/Admin/Block/CreatePageInterface.php b/tests/Behat/Page/Admin/Block/CreatePageInterface.php index 01e17b41..59644f53 100755 --- a/tests/Behat/Page/Admin/Block/CreatePageInterface.php +++ b/tests/Behat/Page/Admin/Block/CreatePageInterface.php @@ -49,7 +49,5 @@ public function disable(): void; public function selectTemplate(string $templateName): void; - public function useTemplate(): void; - public function confirmUseTemplate(): void; } diff --git a/tests/Behat/Page/Admin/Page/CreatePage.php b/tests/Behat/Page/Admin/Page/CreatePage.php index cf5e63b7..7476451a 100755 --- a/tests/Behat/Page/Admin/Page/CreatePage.php +++ b/tests/Behat/Page/Admin/Page/CreatePage.php @@ -276,11 +276,6 @@ public function selectTemplate(string $templateName): void $item->click(); } - public function useTemplate(): void - { - $this->getDocument()->findLink('Use this template')->click(); - } - public function confirmUseTemplate(): void { $this->getDocument()->findById('load-template-confirmation-button')->click(); diff --git a/tests/Behat/Page/Admin/Page/CreatePageInterface.php b/tests/Behat/Page/Admin/Page/CreatePageInterface.php index 59fee985..3b533859 100755 --- a/tests/Behat/Page/Admin/Page/CreatePageInterface.php +++ b/tests/Behat/Page/Admin/Page/CreatePageInterface.php @@ -53,7 +53,5 @@ public function addTaxonsListContentElementWithTaxons(array $taxons): void; public function selectTemplate(string $templateName): void; - public function useTemplate(): void; - public function confirmUseTemplate(): void; }