diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index a43b7b2b55922131ca178be3a4b4cfe3dc2c374b..13c6962b792ad0731340dec634e042ce43951953 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -1404,6 +1404,22 @@ JS; throw new Exception('The image media browser failed to open.'); } } + + /** + * #varbase: To find an element with a selected index having the + * first attribute, and check if it's have the second one. + * + * Example #1: Then I should see the "1" "wrapper" with "align2right" class + * + * @Then I should see the :nth :arg1 with :arg2 class + */ + public function iShouldSeeTheElementWithTheIndexHavingTheAttribute($index, $wrapper, $position) { + $items = $this->getSession()->getPage()->findAll('css', '.' . $wrapper); + $item = $items[$index]->find('css', '.' . $wrapper . '.' . $position); + if (!$item) { + throw new Exception("The image position is wrong"); + } + } public function cleanUsers() { @@ -1462,18 +1478,4 @@ JS; $this->getSession()->getDriver()->maximizeWindow(); } - /** - * Find the :nth element having the first attribute - * and check if it's have the second one. - * - * @Then I should see the :nth :arg1 with :arg2 class - */ - public function iShouldSeeTheHaveAttribute($index, $wrapper, $position) { - $items = $this->getSession()->getPage()->findAll('css', '.' . $wrapper); - $item = $items[$index]->find('css', '.' . $wrapper . '.' . $position); - if (!$item) { - throw new Exception("The image position is wrong"); - } - } - } diff --git a/tests/features/varbase/step2-apply-tests/26 - Content Structure Features - Landing Pages - Varbase text and image paragraphs.feature b/tests/features/varbase/step2-apply-tests/26-content-structure-features_anding-pages-varbase-text-and-image-paragraphs.feature similarity index 61% rename from tests/features/varbase/step2-apply-tests/26 - Content Structure Features - Landing Pages - Varbase text and image paragraphs.feature rename to tests/features/varbase/step2-apply-tests/26-content-structure-features_anding-pages-varbase-text-and-image-paragraphs.feature index 2ff08fac19dd02592f09db1f279bb2f6d0bc95db..e186a0eccddcd8911577a17cf479cac80fe52a6e 100644 --- a/tests/features/varbase/step2-apply-tests/26 - Content Structure Features - Landing Pages - Varbase text and image paragraphs.feature +++ b/tests/features/varbase/step2-apply-tests/26-content-structure-features_anding-pages-varbase-text-and-image-paragraphs.feature @@ -1,7 +1,7 @@ Feature: Content Structure Features - Landing Pages - Varbase text and image paragraphs. As a logged in user with a permission to mange Landing pages -I want to be able to create a new Landing page that will look like this page https://www.getopensocial.com/features -So that the "Landing page" will look like this page https://www.getopensocial.com/features +I want to be able to add number of Text and image paragraph compoments +So that the "Landing page" will have text and images in right and left view. @javascript @local @development Scenario: Check if a user with a permission to manage "Landing page" content type create a new Landing page that will look like this page https://www.getopensocial.com/features @@ -9,8 +9,8 @@ So that the "Landing page" will look like this page https://www.getopensocial.co Given I am a logged in user with the "test_site_admin" user When I go to "node/add/landing_page" And I wait - And I fill in "Open Social Features" for "Title" - And I fill in "Greenpeace Greenwire social network spurs 600% increase in volunteering" for "Page description" + And I fill in "Test landing page title for text and image paragraphs" for "Title" + And I fill in "Test landing page body description." for "Page description" # Add Simple text centered And I Expand the "0" select list "dropbutton-multiple" @@ -18,12 +18,12 @@ So that the "Landing page" will look like this page https://www.getopensocial.co And I scrolldown And I press "Add Simple" And I wait for AJAX to finish - And I fill in the rich text editor field "Text" with "Open Social allows people to collaborate, organise and find the right talent at the right moment. It is especially suitable for volunteer communities within NGO organisations and to replace existing (proprietary) intranets" + And I fill in the rich text editor field "Text" with "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor diam, interdum in quam in, vehicula varius sem. Sed eu augue diam. Proin elementum bibendum tristique. Nam at ante sem. Mauris suscipit felis eget orci porttitor, feugiat viverra elit commodo. Proin quis erat laoreet, tempor nisl nec, varius quam. Maecenas malesuada est sollicitudin euismod posuere." When I select all text in "Text" field And I click on "justifycenter" command button in the rich text editor field "Text" And I wait And I press "Save" - Then I should see "Open Social allows people to collaborate, organise and find the right talent at the right moment. It is especially suitable for volunteer communities within NGO organisations and to replace existing (proprietary) intranets" in the "p" element with the "class" attribute set to "text-align-center" + Then I should see "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor diam, interdum in quam in, vehicula varius sem. Sed eu augue diam. Proin elementum bibendum tristique. Nam at ante sem. Mauris suscipit felis eget orci porttitor, feugiat viverra elit commodo. Proin quis erat laoreet, tempor nisl nec, varius quam. Maecenas malesuada est sollicitudin euismod posuere." in the "p" element with the "class" attribute set to "text-align-center" # Add Text and Image -> image to the right When I click "Edit" @@ -33,7 +33,7 @@ So that the "Landing page" will look like this page https://www.getopensocial.co And I wait And I press "Add Text and image" And I wait for AJAX to finish - And I fill in the rich text editor field "Text" with "Activity streams The activity stream gives all of your users a personalized overview of your community Our algorithms ensure you only see updates that are relevant to you. For example; if someone likes your post or comments in a group you are following, this will be shown in your timeline Our personalized activity stream is central to all the interactions of individual community members. A lively and engaging timeline will keep your users coming back for more" + And I fill in the rich text editor field "Text" with "In eros ipsum, mattis vitae vulputate eu, blandit non risus. Maecenas ultricies volutpat massa id hendrerit. Phasellus magna quam, lacinia sed justo pulvinar, tristique finibus felis. Quisque in sagittis tellus. Curabitur in est at quam maximus elementum. Pellentesque interdum tincidunt nisl, ac efficitur elit aliquam id. Integer egestas neque ut risus tincidunt semper." When I select all text in "Text" field And I click on "justifycenter" command button in the rich text editor field "Text" And I wait @@ -64,7 +64,7 @@ So that the "Landing page" will look like this page https://www.getopensocial.co And I wait And I press "Add Text and image" And I wait for AJAX to finish - And I fill in the rich text editor field "Text" with "Events Events connect your on- and offline experiences Your community members can enroll to both private and public events. Event managers set the location and date and control visibility settings. Users can follow events and post comments to keep the discussion rolling or organize their own Events bridge the gap between the on- and offline engagement of your community members. Getting people aligned along common interests ensures the long term health of your community. This makes events a critical part of any successful community building effort" + And I fill in the rich text editor field "Text" with "Integer pellentesque nisi leo, et bibendum urna egestas in. Vestibulum vestibulum est aliquam, volutpat velit ut, mollis urna. Quisque facilisis a velit a condimentum. Nulla sit amet elementum enim. Aenean nulla ante, fermentum sed facilisis in, porttitor in ex." When I select all text in "Text" field And I click on "justifycenter" command button in the rich text editor field "Text" And I wait