Upgrade TinyMCE to 4.x

This commit is contained in:
Damian Mooyman 2016-02-15 14:58:24 +13:00
parent 3cefb2edad
commit 377af292be
10 changed files with 324 additions and 325 deletions

View File

@ -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

View File

@ -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

View File

@ -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 "<p>my new content</p>"
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"
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"

View File

@ -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<a name="youranchor"></a>"
And a "page" "About Us" has the "Content" "<p>My awesome content</p>"
And a "page" "Details" has the "Content" "<p>My sub-par content<a name="youranchor"></a></p>"
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 "<a href="[file_link,id=4]" target="_blank">awesome</a>"
Then the "Content" HTML field should contain "<a href="[file_link,id=4]">awesome</a>"
# 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 "<p>My awesome content<a name='myanchor'></a></p>"
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 "<p>My <a href='http://silverstripe.org'>awesome</a> 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 <input> 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 <a href='http://silverstripe.org'>awesome</a> 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

View File

@ -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 "<img src=assets/folder1/3d0ef6ec37/file1.jpg>"
And I reload the current page
When I highlight "<img src=assets/folder1/3d0ef6ec37/file1.jpg>" 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"

View File

@ -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"="<p>Welcome</p>"
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"

View File

@ -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 "<p>first content</p>"
And I press the "Publish" button
And I fill in the "Content" HTML field with "<p>my new content</p>"
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
And I set the CMS mode to "Edit mode"
Then I should see an edit page form

View File

@ -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"="<p>initial content</p>"
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 "<p>my new content</p>"
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"="<p>hello world</p>"
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

View File

@ -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 "<p>my new content</p>"
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
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

View File

@ -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"="<p>Some Content</p>"
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"
And the "Page name" field should contain "Empty Page"