Skip to content

Commit

Permalink
OP-322: Behat fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jun 28, 2024
1 parent 7471ad3 commit f09d52a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 0 additions & 11 deletions features/admin/adding_page.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions tests/Behat/Context/Api/PageContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand All @@ -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,
),
Expand Down

0 comments on commit f09d52a

Please sign in to comment.