From f09d52a984b1ce5c6eddf852f79ba7964bbd05ac Mon Sep 17 00:00:00 2001 From: jkindly Date: Fri, 28 Jun 2024 09:23:53 +0200 Subject: [PATCH] OP-322: Behat fixes --- features/admin/adding_page.feature | 11 ----------- tests/Behat/Context/Api/PageContext.php | 6 ++---- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/features/admin/adding_page.feature b/features/admin/adding_page.feature index ac71d4f0c..1c32ec4f2 100644 --- a/features/admin/adding_page.feature +++ b/features/admin/adding_page.feature @@ -28,17 +28,6 @@ Feature: Adding new page And I add it Then I should be notified that the page has been created - @ui @javascript - Scenario: Adding page with page image - And there is an existing "image" media with "aston-martin" code - When I go to the create page page - And I fill the code with "aston_martin_is_amazing_car" - And I fill the slug with "aston_martin_is_amazing_car" - And I fill the name with "Aston Martin is amazing car" - And I fill the meta keywords with "Aston Martin is amazing car" - And I fill the meta description with "Aston Martin is amazing car for this summer." - Then I should be notified that the page has been created - @ui Scenario: Trying to add page with existing code Given there is an existing page with "terms" code diff --git a/tests/Behat/Context/Api/PageContext.php b/tests/Behat/Context/Api/PageContext.php index 30c1e85d1..a1f35a9dd 100644 --- a/tests/Behat/Context/Api/PageContext.php +++ b/tests/Behat/Context/Api/PageContext.php @@ -54,9 +54,8 @@ public function iShouldSeePageInTheList(int $count): void public function iShouldSeeThePage(string $page): void { Assert::true( - $this->responseChecker->hasItemWithTranslation( + $this->responseChecker->hasItemWithValue( $this->apiClient->index(Resources::PAGES), - 'en_US', 'name', $page, ), @@ -82,9 +81,8 @@ public function iOpenPage(PageInterface $page): void public function iShouldSeeThePageName(string $name): void { Assert::true( - $this->responseChecker->hasItemWithTranslation( + $this->responseChecker->hasItemWithValue( $this->apiClient->getLastResponse(), - 'en_US', 'name', $name, ),