diff --git a/features/admin/adding_page.feature b/features/admin/adding_page.feature index 4657175a..ac71d4f0 100644 --- a/features/admin/adding_page.feature +++ b/features/admin/adding_page.feature @@ -14,7 +14,6 @@ Feature: Adding new page And I fill the code with "page_with_title" And I fill the slug with "page_with_title" And I fill the name with "page_with_title" - And I fill the content with "This is a page with a title set by us." And I add it Then I should be notified that the page has been created @@ -26,7 +25,6 @@ Feature: Adding new page And I fill the name with "Top 5 outfits for this summer" And I fill the meta keywords with "TOP 5 summer outfit trends, outfits, Ralph Lauren" And I fill the meta description with "This summer is going to be hot like a pizza." - And I fill the content with "The best looks, trends, inspiration, and shopping picks for summer style." And I add it Then I should be notified that the page has been created @@ -39,9 +37,6 @@ Feature: Adding new page 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." - And I fill the content with "Aston Martin is amazing car for this summer. Buy it." - And I choose "aston-martin" media as image - And I add it Then I should be notified that the page has been created @ui @@ -56,14 +51,14 @@ Feature: Adding new page Scenario: Adding new page with blank data When I go to the create page page And I add it - And I should be notified that "Code, Name, Slug, Content" fields cannot be blank + And I should be notified that "Code, Name, Slug" fields cannot be blank @ui Scenario: Trying to add a page with too short data When I go to the create page page - And I fill "Code, Name, Slug, Meta keywords, Meta description, Content" fields with 1 character + And I fill "Code, Name, Slug, Meta keywords, Meta description" fields with 1 character And I try to add it - Then I should be notified that "Code, Name, Slug, Meta keywords, Meta description, Content" fields are too short + Then I should be notified that "Code, Name, Slug, Meta keywords, Meta description" fields are too short @ui @unstable Scenario: Trying to add a page with too long data @@ -80,6 +75,5 @@ Feature: Adding new page And I add "Blog" and "Homepage" collections to it And I fill the slug with "Slug" And I fill the name with "Best day ever" - And I fill the content with "This was the best day of my life" And I add it Then I should be notified that the page has been created diff --git a/features/admin/managing_pages.feature b/features/admin/managing_pages.feature index f66310f2..1ed2db58 100644 --- a/features/admin/managing_pages.feature +++ b/features/admin/managing_pages.feature @@ -26,16 +26,6 @@ Feature: Managing cms pages Scenario: Updating page Given there is a page in the store When I want to edit this page - And I fill "Code, Content" fields - And I update it - Then I should be notified that the page was updated - - @ui - Scenario: Updating page with image - Given there is a page in the store - And there is an existing "image" media with "aston-martin" code - When I want to edit this page - And I fill "Code, Content" fields - And I choose "aston-martin" media as image + And I fill "Code, Name" fields And I update it Then I should be notified that the page was updated diff --git a/features/api/viewing_pages.feature b/features/api/viewing_pages.feature index 10b6720e..c7234c1d 100644 --- a/features/api/viewing_pages.feature +++ b/features/api/viewing_pages.feature @@ -9,13 +9,11 @@ Feature: Getting data from cms pages And there are 10 pages in the store And the store has "iPhone 8" and "iPhone X" products And there is a page in the store - And this page has these products associated with it And there are existing collections named "Blog" and "General" And this page has these collections associated with it And this page has "About us" name And this page has "about" code And this page also has "about-us" slug - And this page also has "We are the best!" content @api Scenario: Browsing defined pages @@ -27,4 +25,3 @@ Feature: Getting data from cms pages Scenario: Viewing a detailed page Given I view page with code "about" Then I should see the page name "About us" - And I should see the page content "We are the best!" diff --git a/features/shop/displaying_page.feature b/features/shop/displaying_page.feature index 84ea5153..e5c61a7a 100644 --- a/features/shop/displaying_page.feature +++ b/features/shop/displaying_page.feature @@ -11,16 +11,12 @@ Feature: Displaying pages Scenario: Displaying page Given there is a page in the store And the store has "iPhone 8" and "iPhone X" products - And this page has these products associated with it And there are existing collections named "Blog" and "General" And this page has these collections associated with it And this page has "About us" name And this page also has "about-us" slug - And this page also has "Lorem ipsum" content When I go to the "about-us" page Then I should see a page with "About us" name - And I should also see "Lorem ipsum" content - And I should also see "iPhone 8" and "iPhone X" products associated with this page And I should also see "Blog" and "General" collections associated with this page @ui @@ -31,31 +27,12 @@ Feature: Displaying pages When I go to this page Then I should see the "About" page link in the header - @ui @javascript - Scenario: Displaying page with image - Given there is a page in the store - And the store has "iPhone 8" and "iPhone X" products - And this page has these products associated with it - And there are existing collections named "Blog" and "General" - And this page has these collections associated with it - And this page has "About us" name - And this page also has "about-us" slug - And this page also has "Lorem ipsum" content - And this page also has "homepage_main.jpeg" image - When I go to the "about-us" page - Then I should see a page with "About us" name - And I should also see "Lorem ipsum" content - And I should also see "iPhone 8" and "iPhone X" products associated with this page - And I should also see "Blog" and "General" collections associated with this page - And I should also see page image - @ui @javascript @title Scenario: Displaying page with title Given there is a page in the store And this page has "some_page_with_title" code And this page has "some_page_with_title" name And this page also has "some_page_with_title" slug - And this page also has "Lorem ipsum" content And this page also has "title" title When I go to this page Then I should see page title "title" @@ -66,6 +43,5 @@ Feature: Displaying pages And this page has "title" code And this page has "Title" name And this page also has "title" slug - And this page also has "Lorem ipsum" content When I go to this page Then I should see page title "Sylius" diff --git a/tests/Behat/Context/Setup/PageContext.php b/tests/Behat/Context/Setup/PageContext.php index 273982e4..d6535589 100755 --- a/tests/Behat/Context/Setup/PageContext.php +++ b/tests/Behat/Context/Setup/PageContext.php @@ -132,32 +132,6 @@ public function thisPageAlsoHasTitle(string $title): void $this->entityManager->flush(); } - /** - * @Given this page also has :content image - */ - public function thisPageAlsoHasImage(string $image): void - { - $image = $this->uploadImage($image); - - $this->sharedStorage->get('page')->setImage($image); - - $this->entityManager->flush(); - } - - /** - * @Given this page has these products associated with it - */ - public function thisPageHasTheseProductsAssociatedWithIt(): void - { - $products = $this->productRepository->findAll(); - - foreach ($products as $product) { - $this->sharedStorage->get('page')->addProduct($product); - } - - $this->entityManager->flush(); - } - /** * @Given this page has these collections associated with it */