diff --git a/tests/behat/features/apply-formatting.feature b/tests/behat/features/apply-formatting.feature index 12af1ae7..c41b603f 100644 --- a/tests/behat/features/apply-formatting.feature +++ b/tests/behat/features/apply-formatting.feature @@ -11,7 +11,7 @@ Feature: Apply rich formatting to content Scenario: I can control alignment of selected content Given I select "My awesome headline" in the "Content" HTML field - When I press the "Align Right" button + When I press the "Align right" HTML field button Then "My awesome headline" in the "Content" HTML field should be right aligned But "Some amazing content" in the "Content" HTML field should be left aligned Then I press the "Save draft" button @@ -19,10 +19,9 @@ Feature: Apply rich formatting to content Scenario: I can bold selected content Given I select "awesome" in the "Content" HTML field - When I press the "Bold (Ctrl+B)" button + When I press the "Bold" HTML field button Then "awesome" in the "Content" HTML field should be bold But "My" in the "Content" HTML field should not be bold When I press the "Save draft" button Then "awesome" in the "Content" HTML field should be bold But "My" in the "Content" HTML field should not be bold - \ No newline at end of file diff --git a/tests/behat/features/create-a-page.feature b/tests/behat/features/create-a-page.feature index c7051fd8..ea45ba13 100644 --- a/tests/behat/features/create-a-page.feature +++ b/tests/behat/features/create-a-page.feature @@ -1,14 +1,14 @@ Feature: Create a page - As an author - I want to create a page in the CMS - So that I can grow my website + As an author + I want to create a page in the CMS + So that I can grow my website - @javascript - Scenario: I can create a page from the pages section - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see a "Add new" button in CMS Content Toolbar - When I press the "Add new" button - And I select the "Page" radio button - And I press the "Create" button - Then I should see an edit page form + @javascript + Scenario: I can create a page from the pages section + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see a "Add new" button in CMS Content Toolbar + When I press the "Add new" button + And I select the "Page" radio button + And I press the "Create" button + Then I should see an edit page form diff --git a/tests/behat/features/edit-a-page.feature b/tests/behat/features/edit-a-page.feature index 6e08aa29..b7b52881 100644 --- a/tests/behat/features/edit-a-page.feature +++ b/tests/behat/features/edit-a-page.feature @@ -1,29 +1,29 @@ Feature: Edit a page - As an author - I want to edit a page in the CMS - So that I correct errors and provide new information + As an author + I want to edit a page in the CMS + So that I correct errors and provide new information - Background: - Given a "page" "About Us" - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "About Us" in the tree + Background: + Given a "page" "About Us" + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "About Us" in the tree - @javascript - Scenario: I can open a page for editing from the pages tree - When I click on "About Us" in the tree - Then I should see an edit page form + @javascript + Scenario: I can open a page for editing from the pages tree + When I click on "About Us" in the tree + Then I should see an edit page form - @javascript - Scenario: I can edit title and content and see the changes on draft - When I click on "About Us" in the tree - Then I should see an edit page form + @javascript + Scenario: I can edit title and content and see the changes on draft + When I click on "About Us" in the tree + Then I should see an edit page form - When I fill in "Title" with "About Us!" - And I fill in the "Content" HTML field with "my new content" - And I press the "Save draft" button - Then I should see "Saved" in the "button#Form_EditForm_action_save" element + When I fill in "Title" with "About Us!" + And I fill in the "Content" HTML field with "

my new content

" + And I press the "Save draft" button + Then I should see "Saved" in the "button#Form_EditForm_action_save" element - When I click on "About Us" in the tree - Then the "Title" field should contain "About Us!" - And the "Content" HTML field should contain "my new content" \ No newline at end of file + When I click on "About Us" in the tree + Then the "Title" field should contain "About Us!" + And the "Content" HTML field should contain "my new content" diff --git a/tests/behat/features/insert-a-link.feature b/tests/behat/features/insert-a-link.feature index 4fc3b049..8618e9a7 100644 --- a/tests/behat/features/insert-a-link.feature +++ b/tests/behat/features/insert-a-link.feature @@ -1,4 +1,4 @@ -@assets +@assets Feature: Insert links into a page As a cms author I want to insert a link into my content @@ -6,8 +6,8 @@ So that I can link to a external website or a page on my site Background: Given a "page" "Home" - And a "page" "About Us" has the "Content" "My awesome content" - And a "page" "Details" has the "Content" "My sub-par content" + And a "page" "About Us" has the "Content" "

My awesome content

" + And a "page" "Details" has the "Content" "

My sub-par content

" And a "file" "assets/file1.jpg" And I am logged in with "ADMIN" permissions And I go to "/admin/pages" @@ -15,7 +15,7 @@ So that I can link to a external website or a page on my site Scenario: I can link to an internal page Given I select "awesome" in the "Content" HTML field - And I press the "Insert Link" button + And I press the "Insert Link" HTML field button When I select the "Page on the site" radio button And I fill in the "internal" dropdown with "Home" And I fill in "my desc" for "Link description" @@ -27,7 +27,7 @@ So that I can link to a external website or a page on my site Scenario: I can link to an anchor in an internal page Given I select "awesome" in the "Content" HTML field - And I press the "Insert Link" button + And I press the "Insert Link" HTML field button And I select the "Page on the site" radio button And I fill in the "internal" dropdown with "Details" And I wait for 1 second @@ -39,7 +39,7 @@ So that I can link to a external website or a page on my site Scenario: I can link to an external URL Given I select "awesome" in the "Content" HTML field - And I press the "Insert Link" button + And I press the "Insert Link" HTML field button When I select the "Another website" radio button And I fill in "http://silverstripe.org" for "URL" And I check "Open link in a new window" @@ -50,22 +50,22 @@ So that I can link to a external website or a page on my site Scenario: I can link to a file Given I select "awesome" in the "Content" HTML field - When I press the "Insert Link" button + When I press the "Insert Link" HTML field button When I select the "Download a file" radio button And I attach the file "testfile.jpg" to "file[Uploads][]" with HTML5 And I press the "Insert" button - Then the "Content" HTML field should contain "awesome" + Then the "Content" HTML field should contain "awesome" # Required to avoid "unsaved changes" browser dialog Then I press the "Save draft" button # Check that the field is reset when adding another new link Given I select "content" in the "Content" HTML field - When I press the "Insert Link" button + When I press the "Insert Link" HTML field button Then I should not see a ".ss-uploadfield-files .ss-uploadfield-item" element Scenario: I can link to an anchor Given I fill in the "Content" HTML field with "

My awesome content

" And I select "awesome" in the "Content" HTML field - When I press the "Insert Link" button + When I press the "Insert Link" HTML field button When I select the "Anchor on this page" radio button And I select "myanchor" from "Form_EditorToolbarLinkForm_AnchorSelector" And I press the "Insert" button @@ -76,7 +76,7 @@ So that I can link to a external website or a page on my site Scenario: I can edit a link Given I fill in the "Content" HTML field with "

My awesome content" And I select "awesome" in the "Content" HTML field - When I press the "Insert Link" button + When I press the "Insert Link" HTML field button # We need to hard-code the id attribute, if you say 'Then the URL field', it picks up URLSegment instead. Then the "Form_EditorToolbarLinkForm_external" field should contain "http://silverstripe.org" # This doesn't seem to suffer from that issue @@ -89,7 +89,7 @@ So that I can link to a external website or a page on my site Scenario: I can remove a link Given I fill in the "Content" HTML field with "My awesome content" And I select "awesome" in the "Content" HTML field - When I press the "Unlink" button + When I press the "Remove link" HTML field button Then the "Content" HTML field should contain "My awesome content" And the "Content" HTML field should not contain "http://silverstripe.org" # Required to avoid "unsaved changes" browser dialog diff --git a/tests/behat/features/insert-an-image.feature b/tests/behat/features/insert-an-image.feature index caf30530..5a0b28b8 100644 --- a/tests/behat/features/insert-an-image.feature +++ b/tests/behat/features/insert-an-image.feature @@ -13,21 +13,21 @@ Feature: Insert an image into a page And I click on "About Us" in the tree Scenario: I can insert an image from a URL - Given I press the "Insert Media" button + Given I press the "Insert Media" HTML field button When I press the "Insert from URL" button And I fill in "RemoteURL" with "http://www.silverstripe.org/themes/ssv3/img/ss_logo.png" And I press the "Add url" button Then I should see "ss_logo.png" in the ".ss-assetuploadfield span.name" element - When I press the "Insert" button + When I press the "Insert" button Then the "Content" HTML field should contain "ss_logo.png" # Required to avoid "unsaved changed" browser dialog Then I press the "Save draft" button @assets Scenario: I can insert an image uploaded from my own computer - Given I press the "Insert Media" button + Given I press the "Insert Media" HTML field button And I attach the file "testfile.jpg" to "AssetUploadField" with HTML5 # TODO Delay previous step until upload succeeded And I wait for 2 seconds @@ -40,7 +40,7 @@ Feature: Insert an image into a page @assets Scenario: I can upload an image from my own computer that matches the name of an existing file Given a "image" "assets/Uploads/file1.jpg" - When I press the "Insert Media" button + When I press the "Insert Media" HTML field button And I attach the file "file1.jpg" to "AssetUploadField" with HTML5 # TODO Delay previous step until upload succeeded And I wait for 2 seconds @@ -53,7 +53,7 @@ Feature: Insert an image into a page Then I press the "Save draft" button Scenario: I can insert an image from the CMS file store - Given I press the "Insert Media" button + Given I press the "Insert Media" HTML field button And I fill in the "ParentID" dropdown with "folder1" And I click on "file1" in the "Files" table When I press the "Insert" button @@ -62,7 +62,7 @@ Feature: Insert an image into a page Then I press the "Save draft" button Scenario: I can edit properties of an image before inserting it - Given I press the "Insert Media" button + Given I press the "Insert Media" HTML field button And I fill in the "ParentID" dropdown with "folder1" And I click on "file1" in the "Files" table And I press the "Edit" button @@ -79,7 +79,7 @@ Feature: Insert an image into a page Given the "page" "About us" contains "" And I reload the current page When I highlight "" in the "Content" HTML field - And I press the "Insert Media" button + And I press the "Insert Media" HTML field button Then I should see "file1.jpg" When I fill in "Width" with "10" When I fill in "Height" with "20" diff --git a/tests/behat/features/manage-page-permissions.feature b/tests/behat/features/manage-page-permissions.feature index 205112d6..c5343f6f 100644 --- a/tests/behat/features/manage-page-permissions.feature +++ b/tests/behat/features/manage-page-permissions.feature @@ -1,58 +1,58 @@ Feature: Manage global page permissions -As an administrator -I want to manage view and edit permission defaults on pages -In order to set good defaults and avoid repeating myself on each page + As an administrator + I want to manage view and edit permission defaults on pages + In order to set good defaults and avoid repeating myself on each page -Background: - Given a "page" "Home" with "Content"="Welcome" - And a "group" "AUTHOR group" has permissions "Access to 'Pages' section" - And a "group" "SECURITY group" has permissions "Access to 'Security' section" - And I am logged in with "ADMIN" permissions - And I go to "admin/settings" - And I click the "Access" CMS tab + Background: + Given a "page" "Home" with "Content"="

Welcome

" + And a "group" "AUTHOR group" has permissions "Access to 'Pages' section" + And a "group" "SECURITY group" has permissions "Access to 'Security' section" + And I am logged in with "ADMIN" permissions + And I go to "admin/settings" + And I click the "Access" CMS tab -Scenario: I can open global view permissions to everyone - Given I select "Anyone" from "Who can view pages on this site?" input group - And I press the "Save" button - When I am not logged in - And I go to the homepage - Then I should see "Welcome" + Scenario: I can open global view permissions to everyone + Given I select "Anyone" from "Who can view pages on this site?" input group + And I press the "Save" button + When I am not logged in + And I go to the homepage + Then I should see "Welcome" -Scenario: I can limit global view permissions to logged-in users - Given I select "Logged-in users" from "Who can view pages on this site?" input group - And I press the "Save" button - When I am not logged in - And I go to the homepage - Then I should see a log-in form - When I am logged in with "AUTHOR" permissions - And I go to the homepage - Then I should see "Welcome" + Scenario: I can limit global view permissions to logged-in users + Given I select "Logged-in users" from "Who can view pages on this site?" input group + And I press the "Save" button + When I am not logged in + And I go to the homepage + Then I should see a log-in form + When I am logged in with "AUTHOR" permissions + And I go to the homepage + Then I should see "Welcome" -Scenario: I can limit global view permissions to certain groups - Given I select "Only these people (choose from list)" from "Who can view pages on this site?" input group - And I select "AUTHOR group" from "Viewer Groups" with javascript - And I press the "Save" button - When I am not logged in - And I go to the homepage - Then I should see a log-in form - When I am logged in with "SECURITY" permissions - And I go to the homepage - Then I will see a "warning" log-in message - When I am not logged in - And I am logged in with "AUTHOR" permissions - And I go to the homepage - Then I should see "Welcome" + Scenario: I can limit global view permissions to certain groups + Given I select "Only these people (choose from list)" from "Who can view pages on this site?" input group + And I select "AUTHOR group" from "Viewer Groups" with javascript + And I press the "Save" button + When I am not logged in + And I go to the homepage + Then I should see a log-in form + When I am logged in with "SECURITY" permissions + And I go to the homepage + Then I will see a "warning" log-in message + When I am not logged in + And I am logged in with "AUTHOR" permissions + And I go to the homepage + Then I should see "Welcome" -Scenario: I can limit global edit permissions to logged-in users - Given I select "Anyone who can log-in to the CMS" from "Who can edit pages on this site?" input group - And I press the "Save" button - Then pages should be editable by "AUTHOR" - And pages should be editable by "ADMIN" + Scenario: I can limit global edit permissions to logged-in users + Given I select "Anyone who can log-in to the CMS" from "Who can edit pages on this site?" input group + And I press the "Save" button + Then pages should be editable by "AUTHOR" + And pages should be editable by "ADMIN" -Scenario: I can limit global edit permissions to certain groups - Given I select "Only these people (choose from list)" from "Who can edit pages on this site?" input group - And I select "ADMIN group" from "Editor Groups" with javascript - And I press the "Save" button - Then pages should not be editable by "AUTHOR" - But pages should be editable by "ADMIN" + Scenario: I can limit global edit permissions to certain groups + Given I select "Only these people (choose from list)" from "Who can edit pages on this site?" input group + And I select "ADMIN group" from "Editor Groups" with javascript + And I press the "Save" button + Then pages should not be editable by "AUTHOR" + But pages should be editable by "ADMIN" diff --git a/tests/behat/features/preview-a-page.feature b/tests/behat/features/preview-a-page.feature index ddd4fe25..abe4a994 100644 --- a/tests/behat/features/preview-a-page.feature +++ b/tests/behat/features/preview-a-page.feature @@ -1,46 +1,46 @@ Feature: Preview a page - As an author - I want to preview the page I'm editing in the CMS - So that I can see how it would look like to my visitors + As an author + I want to preview the page I'm editing in the CMS + So that I can see how it would look like to my visitors - Background: - Given a "page" "About Us" + Background: + Given a "page" "About Us" - @javascript - Scenario: I can show a preview of the current page from the pages section - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "About Us" in the tree + @javascript + Scenario: I can show a preview of the current page from the pages section + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "About Us" in the tree - When I click on "About Us" in the tree - And I set the CMS mode to "Preview mode" - Then I can see the preview panel - And the preview contains "About Us" - Then I set the CMS mode to "Edit mode" + When I click on "About Us" in the tree + And I set the CMS mode to "Preview mode" + Then I can see the preview panel + And the preview contains "About Us" + Then I set the CMS mode to "Edit mode" - # TODO: - # - Only tests correctly on fresh database - # - We should continue testing against it after we have fixtures ready - @javascript - Scenario: I can see an updated preview when editing content - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "About Us" in the tree + # TODO: + # - Only tests correctly on fresh database + # - We should continue testing against it after we have fixtures ready + @javascript + Scenario: I can see an updated preview when editing content + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "About Us" in the tree - When I click on "About Us" in the tree - And I fill in the "Content" HTML field with "first content" - And I press the "Publish" button - And I fill in the "Content" HTML field with "my new content" - And I press the "Save draft" button - And I set the CMS mode to "Preview mode" + When I click on "About Us" in the tree + And I fill in the "Content" HTML field with "

first content

" + And I press the "Publish" button + And I fill in the "Content" HTML field with "

my new content

" + And I press the "Save draft" button + And I set the CMS mode to "Preview mode" - When I switch the preview to "Published" - Then the preview does not contain "my new content" - And the preview contains "first content" + When I switch the preview to "Published" + Then the preview does not contain "my new content" + And the preview contains "first content" - When I switch the preview to "Draft" - Then the preview does not contain "first content" - And the preview contains "my new content" + When I switch the preview to "Draft" + Then the preview does not contain "first content" + And the preview contains "my new content" - And I set the CMS mode to "Edit mode" - Then I should see an edit page form \ No newline at end of file + And I set the CMS mode to "Edit mode" + Then I should see an edit page form diff --git a/tests/behat/features/publish-a-page.feature b/tests/behat/features/publish-a-page.feature index 00832f1c..9dafbbf9 100644 --- a/tests/behat/features/publish-a-page.feature +++ b/tests/behat/features/publish-a-page.feature @@ -1,95 +1,95 @@ Feature: Publish a page -As a site owner -I want content to go to a draft site before being published -So that only high quality changes are seen by our visitors + As a site owner + I want content to go to a draft site before being published + So that only high quality changes are seen by our visitors - Background: - Given a "page" "My Page" with "URLSegment"="my-page" and "Content"="initial content" - And the "page" "My Page" is not published + Background: + Given a "page" "My Page" with "URLSegment"="my-page" and "Content"="

initial content

" + And the "page" "My Page" is not published - @javascript - Scenario: I can have a unpublished version of a page that is not publicly available - Given I go to "/my-page" - Then the page can't be found + @javascript + Scenario: I can have a unpublished version of a page that is not publicly available + Given I go to "/my-page" + Then the page can't be found - @javascript - Scenario: I can publish a previously never published page - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see "My Page" in the tree - And I click on "My Page" in the tree - And I press the "Publish" button + @javascript + Scenario: I can publish a previously never published page + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see "My Page" in the tree + And I click on "My Page" in the tree + And I press the "Publish" button - Then I press the "Log out" button - And I go to "/my-page" + Then I press the "Log out" button + And I go to "/my-page" - Then I should see "initial content" + Then I should see "initial content" - @javascript - Scenario: I will get different options depending on the current publish state of the page - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see "My Page" in the tree - And I click on "My Page" in the tree + @javascript + Scenario: I will get different options depending on the current publish state of the page + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see "My Page" in the tree + And I click on "My Page" in the tree - When I click "More options" in the "#ActionMenus" element - Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element - And I should see "Not published" in the "#ActionMenus_MoreOptions" element - And I should see "Archive" in the "#ActionMenus_MoreOptions" element - And I should see a "Save & publish" button - And I should see a "Saved" button + When I click "More options" in the "#ActionMenus" element + Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element + And I should see "Not published" in the "#ActionMenus_MoreOptions" element + And I should see "Archive" in the "#ActionMenus_MoreOptions" element + And I should see a "Save & publish" button + And I should see a "Saved" button - When I fill in the "Content" HTML field with "my new content" - And I click "More options" in the "#ActionMenus" element - Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element - And I should see a "Save & publish" button - And I should see a "Save draft" button + When I fill in the "Content" HTML field with "

my new content

" + And I click "More options" in the "#ActionMenus" element + Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element + And I should see a "Save & publish" button + And I should see a "Save draft" button - When I press the "Publish" button - And I click "More options" in the "#ActionMenus" element - Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element - And I should see "Archive" in the "#ActionMenus_MoreOptions" element - And I should see a "Published" button - And I should see a "Saved" button + When I press the "Publish" button + And I click "More options" in the "#ActionMenus" element + Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element + And I should see "Archive" in the "#ActionMenus_MoreOptions" element + And I should see a "Published" button + And I should see a "Saved" button - @javascript - Scenario: I can unpublish a page - Given a "page" "Hello" with "URLSegment"="hello" and "Content"="hello world" - And I go to "/hello" - Then I should see "hello world" + @javascript + Scenario: I can unpublish a page + Given a "page" "Hello" with "URLSegment"="hello" and "Content"="

hello world

" + And I go to "/hello" + Then I should see "hello world" - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see "Hello" in the tree - And I click on "Hello" in the tree + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see "Hello" in the tree + And I click on "Hello" in the tree - When I click "More options" in the "#ActionMenus" element - And I press the "Unpublish" button, confirming the dialog + When I click "More options" in the "#ActionMenus" element + And I press the "Unpublish" button, confirming the dialog - Then I press the "Log out" button - And I go to "/hello" - Then the page can't be found + Then I press the "Log out" button + And I go to "/hello" + Then the page can't be found - @javascript - Scenario: I can delete a page from live and draft stage to completely remove it - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see "My Page" in the tree - And I click on "My Page" in the tree - And I press the "Publish" button - And I click "More options" in the "#ActionMenus" element - Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element + @javascript + Scenario: I can delete a page from live and draft stage to completely remove it + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see "My Page" in the tree + And I click on "My Page" in the tree + And I press the "Publish" button + And I click "More options" in the "#ActionMenus" element + Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element - When I press the "Unpublish" button, confirming the dialog - And I click "More options" in the "#ActionMenus" element - Then I should see "Archive" in the "#ActionMenus_MoreOptions" element + When I press the "Unpublish" button, confirming the dialog + And I click "More options" in the "#ActionMenus" element + Then I should see "Archive" in the "#ActionMenus_MoreOptions" element - When I press the "Archive" button, confirming the dialog - Then I should see a "Restore" button - And I should not see a "Published" button - And I should not see a "Save & publish" button - And I should not see a "Saved" button - And I should not see a "Save draft" button + When I press the "Archive" button, confirming the dialog + Then I should see a "Restore" button + And I should not see a "Published" button + And I should not see a "Save & publish" button + And I should not see a "Saved" button + And I should not see a "Save draft" button - When I press the "Restore" button, confirming the dialog - Then I should see a "Save & publish" button + When I press the "Restore" button, confirming the dialog + Then I should see a "Save & publish" button diff --git a/tests/behat/features/search-for-a-page.feature b/tests/behat/features/search-for-a-page.feature index 4350ca6b..abd37cf9 100644 --- a/tests/behat/features/search-for-a-page.feature +++ b/tests/behat/features/search-for-a-page.feature @@ -1,117 +1,117 @@ Feature: Search for a page - As an author - I want to search for a page in the CMS - So that I can efficiently navigate nested content structures + As an author + I want to search for a page in the CMS + So that I can efficiently navigate nested content structures - Background: - Given a "page" "Home" - And a "page" "About Us" - And a "page" "Contact Us" - And I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I expand the content filters + Background: + Given a "page" "Home" + And a "page" "About Us" + And a "page" "Contact Us" + And I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I expand the content filters - Scenario: I can search for a page by its title - Given I fill in "Search" with "About Us" - And I press the "Search" button - Then I should see "About Us" in the tree - But I should not see "Contact Us" in the tree + Scenario: I can search for a page by its title + Given I fill in "Search" with "About Us" + And I press the "Search" button + Then I should see "About Us" in the tree + But I should not see "Contact Us" in the tree - Scenario: I can search for a page by its type - Given a "Error Page" "My Error Page" - When I select "Error Page" from "Page type" - And I press the "Search" button - Then I should see "My Error Page" in the tree - But I should not see "Contact Us" in the tree + Scenario: I can search for a page by its type + Given a "Error Page" "My Error Page" + When I select "Error Page" from "Page type" + And I press the "Search" button + Then I should see "My Error Page" in the tree + But I should not see "Contact Us" in the tree - Scenario: I can search for a page by its oldest last edited date - Given a "page" "Recent Page" - And a "page" "Old Page" was last edited "7 days ago" - When I fill in "From" with "the date of 5 days ago" - And I press the "Search" button - Then I should see "Recent Page" in the tree - But I should not see "Old Page" in the tree + Scenario: I can search for a page by its oldest last edited date + Given a "page" "Recent Page" + And a "page" "Old Page" was last edited "7 days ago" + When I fill in "From" with "the date of 5 days ago" + And I press the "Search" button + Then I should see "Recent Page" in the tree + But I should not see "Old Page" in the tree - Scenario: I can search for a page by its newest last edited date - Given a "page" "Recent Page" - And a "page" "Old Page" was last edited "7 days ago" - When I fill in "To" with "the date of 5 days ago" - And I press the "Search" button - Then I should not see "Recent Page" in the tree - But I should see "Old Page" in the tree + Scenario: I can search for a page by its newest last edited date + Given a "page" "Recent Page" + And a "page" "Old Page" was last edited "7 days ago" + When I fill in "To" with "the date of 5 days ago" + And I press the "Search" button + Then I should not see "Recent Page" in the tree + But I should see "Old Page" in the tree - Scenario: I can include deleted pages in my search - Given a "page" "Deleted Page" - And the "page" "Deleted Page" is unpublished - And the "page" "Deleted Page" is deleted - When I press the "Search" button - Then I should not see "Deleted Page" in the tree - When I expand the content filters - And I select "All pages, including archived" from "Page status" - And I press the "Search" button - Then I should see "Deleted Page" in the tree + Scenario: I can include deleted pages in my search + Given a "page" "Deleted Page" + And the "page" "Deleted Page" is unpublished + And the "page" "Deleted Page" is deleted + When I press the "Search" button + Then I should not see "Deleted Page" in the tree + When I expand the content filters + And I select "All pages, including archived" from "Page status" + And I press the "Search" button + Then I should see "Deleted Page" in the tree - Scenario: I can include only deleted pages in my search - Given a "page" "Deleted Page" - And the "page" "Deleted Page" is unpublished - And the "page" "Deleted Page" is deleted - When I press the "Search" button - Then I should not see "Deleted Page" in the tree - When I expand the content filters - And I select "Archived pages" from "Page status" - And I press the "Search" button - Then I should see "Deleted Page" in the tree - And I should not see "About Us" in the tree + Scenario: I can include only deleted pages in my search + Given a "page" "Deleted Page" + And the "page" "Deleted Page" is unpublished + And the "page" "Deleted Page" is deleted + When I press the "Search" button + Then I should not see "Deleted Page" in the tree + When I expand the content filters + And I select "Archived pages" from "Page status" + And I press the "Search" button + Then I should see "Deleted Page" in the tree + And I should not see "About Us" in the tree - Scenario: I can include draft pages in my search - Given a "page" "Draft Page" - And the "page" "Draft Page" is not published - When I press the "Search" button - Then I should see "Draft Page" in the tree - When I expand the content filters - And I select "Draft pages" from "Page status" - And I press the "Search" button - Then I should see "Draft Page" in the tree - And I should not see "About Us" in the tree + Scenario: I can include draft pages in my search + Given a "page" "Draft Page" + And the "page" "Draft Page" is not published + When I press the "Search" button + Then I should see "Draft Page" in the tree + When I expand the content filters + And I select "Draft pages" from "Page status" + And I press the "Search" button + Then I should see "Draft Page" in the tree + And I should not see "About Us" in the tree - Scenario: I can include changed pages in my search - When I click on "About Us" in the tree - Then I should see an edit page form + Scenario: I can include changed pages in my search + When I click on "About Us" in the tree + Then I should see an edit page form - When I fill in the "Content" HTML field with "my new content" - And I press the "Save draft" button - Then I should see "Saved" in the "button#Form_EditForm_action_save" element + When I fill in the "Content" HTML field with "

my new content

" + And I press the "Save draft" button + Then I should see "Saved" in the "button#Form_EditForm_action_save" element - When I go to "/admin/pages" - And I expand the content filters - When I select "Modified pages" from "Page status" - And I press the "Search" button - Then I should see "About Us" in the tree - And I should not see "Home" in the tree + When I go to "/admin/pages" + And I expand the content filters + When I select "Modified pages" from "Page status" + And I press the "Search" button + Then I should see "About Us" in the tree + And I should not see "Home" in the tree - Scenario: I can include live pages in my search - Given a "page" "Live Page" - And the "page" "Live Page" is published - And the "page" "Live Page" is deleted - When I press the "Search" button - Then I should not see "Live Page" in the tree - When I expand the content filters - And I select "Live but removed from draft" from "Page status" - And I press the "Search" button - Then I should see "Live Page" in the tree - And I should not see "About Us" in the tree + Scenario: I can include live pages in my search + Given a "page" "Live Page" + And the "page" "Live Page" is published + And the "page" "Live Page" is deleted + When I press the "Search" button + Then I should not see "Live Page" in the tree + When I expand the content filters + And I select "Live but removed from draft" from "Page status" + And I press the "Search" button + Then I should see "Live Page" in the tree + And I should not see "About Us" in the tree - Scenario: I can include only live pages in my search - Given a "page" "Live Page" - And the "page" "Live Page" is published - And a "page" "Draft Page" - And a "page" "Draft Page" is unpublished - And a "page" "Deleted Page" - And the "page" "Deleted Page" is unpublished - And the "page" "Deleted Page" is deleted + Scenario: I can include only live pages in my search + Given a "page" "Live Page" + And the "page" "Live Page" is published + And a "page" "Draft Page" + And a "page" "Draft Page" is unpublished + And a "page" "Deleted Page" + And the "page" "Deleted Page" is unpublished + And the "page" "Deleted Page" is deleted - When I select "Published pages" from "Page status" - And I press the "Search" button - Then I should not see "Draft Page" in the tree - And I should not see "Deleted Page" in the tree - But I should see "Live Page" in the tree \ No newline at end of file + When I select "Published pages" from "Page status" + And I press the "Search" button + Then I should not see "Draft Page" in the tree + And I should not see "Deleted Page" in the tree + But I should see "Live Page" in the tree diff --git a/tests/behat/features/view-reports.feature b/tests/behat/features/view-reports.feature index 837eb66a..8fab9bbc 100644 --- a/tests/behat/features/view-reports.feature +++ b/tests/behat/features/view-reports.feature @@ -5,7 +5,7 @@ Feature: View Reports Background: Given a "page" "Empty Page" - And a "page" "Filled Page" with "Content"="Some Content" + And a "page" "Filled Page" with "Content"="

Some Content

" And I am logged in with "ADMIN" permissions And I go to "/admin/reports" @@ -15,4 +15,4 @@ Feature: View Reports But I should not see "Filled Page" When I follow "Empty Page" Then I should see an edit page form - And the "Page name" field should contain "Empty Page" \ No newline at end of file + And the "Page name" field should contain "Empty Page"