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 Scenario: I can control alignment of selected content
Given I select "My awesome headline" in the "Content" HTML field 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 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 But "Some amazing content" in the "Content" HTML field should be left aligned
Then I press the "Save draft" button Then I press the "Save draft" button
@ -19,10 +19,9 @@ Feature: Apply rich formatting to content
Scenario: I can bold selected content Scenario: I can bold selected content
Given I select "awesome" in the "Content" HTML field 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 Then "awesome" in the "Content" HTML field should be bold
But "My" in the "Content" HTML field should not be bold But "My" in the "Content" HTML field should not be bold
When I press the "Save draft" button When I press the "Save draft" button
Then "awesome" in the "Content" HTML field should be bold Then "awesome" in the "Content" HTML field should be bold
But "My" in the "Content" HTML field should not be bold But "My" in the "Content" HTML field should not be bold

View File

@ -1,14 +1,14 @@
Feature: Create a page Feature: Create a page
As an author As an author
I want to create a page in the CMS I want to create a page in the CMS
So that I can grow my website So that I can grow my website
@javascript @javascript
Scenario: I can create a page from the pages section Scenario: I can create a page from the pages section
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see a "Add new" button in CMS Content Toolbar And I should see a "Add new" button in CMS Content Toolbar
When I press the "Add new" button When I press the "Add new" button
And I select the "Page" radio button And I select the "Page" radio button
And I press the "Create" button And I press the "Create" button
Then I should see an edit page form Then I should see an edit page form

View File

@ -1,29 +1,29 @@
Feature: Edit a page Feature: Edit a page
As an author As an author
I want to edit a page in the CMS I want to edit a page in the CMS
So that I correct errors and provide new information So that I correct errors and provide new information
Background: Background:
Given a "page" "About Us" Given a "page" "About Us"
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in the tree Then I should see "About Us" in the tree
@javascript @javascript
Scenario: I can open a page for editing from the pages tree Scenario: I can open a page for editing from the pages tree
When I click on "About Us" in the tree When I click on "About Us" in the tree
Then I should see an edit page form Then I should see an edit page form
@javascript @javascript
Scenario: I can edit title and content and see the changes on draft Scenario: I can edit title and content and see the changes on draft
When I click on "About Us" in the tree When I click on "About Us" in the tree
Then I should see an edit page form Then I should see an edit page form
When I fill in "Title" with "About Us!" When I fill in "Title" with "About Us!"
And I fill in the "Content" HTML field with "my new content" And I fill in the "Content" HTML field with "<p>my new content</p>"
And I press the "Save draft" button And I press the "Save draft" button
Then I should see "Saved" in the "button#Form_EditForm_action_save" element Then I should see "Saved" in the "button#Form_EditForm_action_save" element
When I click on "About Us" in the tree When I click on "About Us" in the tree
Then the "Title" field should contain "About Us!" Then the "Title" field should contain "About Us!"
And the "Content" HTML field should contain "my new content" And the "Content" HTML field should contain "my new content"

View File

@ -1,4 +1,4 @@
@assets @assets
Feature: Insert links into a page Feature: Insert links into a page
As a cms author As a cms author
I want to insert a link into my content 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: Background:
Given a "page" "Home" Given a "page" "Home"
And a "page" "About Us" has the "Content" "My awesome content" And a "page" "About Us" has the "Content" "<p>My awesome content</p>"
And a "page" "Details" has the "Content" "My sub-par content<a name="youranchor"></a>" And a "page" "Details" has the "Content" "<p>My sub-par content<a name="youranchor"></a></p>"
And a "file" "assets/file1.jpg" And a "file" "assets/file1.jpg"
And I am logged in with "ADMIN" permissions And I am logged in with "ADMIN" permissions
And I go to "/admin/pages" 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 Scenario: I can link to an internal page
Given I select "awesome" in the "Content" HTML field 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 When I select the "Page on the site" radio button
And I fill in the "internal" dropdown with "Home" And I fill in the "internal" dropdown with "Home"
And I fill in "my desc" for "Link description" 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 Scenario: I can link to an anchor in an internal page
Given I select "awesome" in the "Content" HTML field 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 select the "Page on the site" radio button
And I fill in the "internal" dropdown with "Details" And I fill in the "internal" dropdown with "Details"
And I wait for 1 second 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 Scenario: I can link to an external URL
Given I select "awesome" in the "Content" HTML field 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 When I select the "Another website" radio button
And I fill in "http://silverstripe.org" for "URL" And I fill in "http://silverstripe.org" for "URL"
And I check "Open link in a new window" 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 Scenario: I can link to a file
Given I select "awesome" in the "Content" HTML field 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 When I select the "Download a file" radio button
And I attach the file "testfile.jpg" to "file[Uploads][]" with HTML5 And I attach the file "testfile.jpg" to "file[Uploads][]" with HTML5
And I press the "Insert" button 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 # Required to avoid "unsaved changes" browser dialog
Then I press the "Save draft" button Then I press the "Save draft" button
# Check that the field is reset when adding another new link # Check that the field is reset when adding another new link
Given I select "content" in the "Content" HTML field 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 Then I should not see a ".ss-uploadfield-files .ss-uploadfield-item" element
Scenario: I can link to an anchor 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>" 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 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 When I select the "Anchor on this page" radio button
And I select "myanchor" from "Form_EditorToolbarLinkForm_AnchorSelector" And I select "myanchor" from "Form_EditorToolbarLinkForm_AnchorSelector"
And I press the "Insert" button 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 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" 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 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. # 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" Then the "Form_EditorToolbarLinkForm_external" field should contain "http://silverstripe.org"
# This doesn't seem to suffer from that issue # 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 Scenario: I can remove a link
Given I fill in the "Content" HTML field with "My <a href='http://silverstripe.org'>awesome</a> content" 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 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" Then the "Content" HTML field should contain "My awesome content"
And the "Content" HTML field should not contain "http://silverstripe.org" And the "Content" HTML field should not contain "http://silverstripe.org"
# Required to avoid "unsaved changes" browser dialog # 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 And I click on "About Us" in the tree
Scenario: I can insert an image from a URL 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 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 fill in "RemoteURL" with "http://www.silverstripe.org/themes/ssv3/img/ss_logo.png"
And I press the "Add url" button And I press the "Add url" button
Then I should see "ss_logo.png" in the ".ss-assetuploadfield span.name" element 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" Then the "Content" HTML field should contain "ss_logo.png"
# Required to avoid "unsaved changed" browser dialog # Required to avoid "unsaved changed" browser dialog
Then I press the "Save draft" button Then I press the "Save draft" button
@assets @assets
Scenario: I can insert an image uploaded from my own computer 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 And I attach the file "testfile.jpg" to "AssetUploadField" with HTML5
# TODO Delay previous step until upload succeeded # TODO Delay previous step until upload succeeded
And I wait for 2 seconds And I wait for 2 seconds
@ -40,7 +40,7 @@ Feature: Insert an image into a page
@assets @assets
Scenario: I can upload an image from my own computer that matches the name of an existing file 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" 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 And I attach the file "file1.jpg" to "AssetUploadField" with HTML5
# TODO Delay previous step until upload succeeded # TODO Delay previous step until upload succeeded
And I wait for 2 seconds And I wait for 2 seconds
@ -53,7 +53,7 @@ Feature: Insert an image into a page
Then I press the "Save draft" button Then I press the "Save draft" button
Scenario: I can insert an image from the CMS file store 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 fill in the "ParentID" dropdown with "folder1"
And I click on "file1" in the "Files" table And I click on "file1" in the "Files" table
When I press the "Insert" button When I press the "Insert" button
@ -62,7 +62,7 @@ Feature: Insert an image into a page
Then I press the "Save draft" button Then I press the "Save draft" button
Scenario: I can edit properties of an image before inserting it 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 fill in the "ParentID" dropdown with "folder1"
And I click on "file1" in the "Files" table And I click on "file1" in the "Files" table
And I press the "Edit" button 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>" Given the "page" "About us" contains "<img src=assets/folder1/3d0ef6ec37/file1.jpg>"
And I reload the current page And I reload the current page
When I highlight "<img src=assets/folder1/3d0ef6ec37/file1.jpg>" in the "Content" HTML field 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" Then I should see "file1.jpg"
When I fill in "Width" with "10" When I fill in "Width" with "10"
When I fill in "Height" with "20" When I fill in "Height" with "20"

View File

@ -1,58 +1,58 @@
Feature: Manage global page permissions Feature: Manage global page permissions
As an administrator As an administrator
I want to manage view and edit permission defaults on pages I want to manage view and edit permission defaults on pages
In order to set good defaults and avoid repeating myself on each page In order to set good defaults and avoid repeating myself on each page
Background: Background:
Given a "page" "Home" with "Content"="Welcome" Given a "page" "Home" with "Content"="<p>Welcome</p>"
And a "group" "AUTHOR group" has permissions "Access to 'Pages' section" And a "group" "AUTHOR group" has permissions "Access to 'Pages' section"
And a "group" "SECURITY group" has permissions "Access to 'Security' section" And a "group" "SECURITY group" has permissions "Access to 'Security' section"
And I am logged in with "ADMIN" permissions And I am logged in with "ADMIN" permissions
And I go to "admin/settings" And I go to "admin/settings"
And I click the "Access" CMS tab And I click the "Access" CMS tab
Scenario: I can open global view permissions to everyone Scenario: I can open global view permissions to everyone
Given I select "Anyone" from "Who can view pages on this site?" input group Given I select "Anyone" from "Who can view pages on this site?" input group
And I press the "Save" button And I press the "Save" button
When I am not logged in When I am not logged in
And I go to the homepage And I go to the homepage
Then I should see "Welcome" Then I should see "Welcome"
Scenario: I can limit global view permissions to logged-in users 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 Given I select "Logged-in users" from "Who can view pages on this site?" input group
And I press the "Save" button And I press the "Save" button
When I am not logged in When I am not logged in
And I go to the homepage And I go to the homepage
Then I should see a log-in form Then I should see a log-in form
When I am logged in with "AUTHOR" permissions When I am logged in with "AUTHOR" permissions
And I go to the homepage And I go to the homepage
Then I should see "Welcome" Then I should see "Welcome"
Scenario: I can limit global view permissions to certain groups 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 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 select "AUTHOR group" from "Viewer Groups" with javascript
And I press the "Save" button And I press the "Save" button
When I am not logged in When I am not logged in
And I go to the homepage And I go to the homepage
Then I should see a log-in form Then I should see a log-in form
When I am logged in with "SECURITY" permissions When I am logged in with "SECURITY" permissions
And I go to the homepage And I go to the homepage
Then I will see a "warning" log-in message Then I will see a "warning" log-in message
When I am not logged in When I am not logged in
And I am logged in with "AUTHOR" permissions And I am logged in with "AUTHOR" permissions
And I go to the homepage And I go to the homepage
Then I should see "Welcome" Then I should see "Welcome"
Scenario: I can limit global edit permissions to logged-in users 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 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 And I press the "Save" button
Then pages should be editable by "AUTHOR" Then pages should be editable by "AUTHOR"
And pages should be editable by "ADMIN" And pages should be editable by "ADMIN"
Scenario: I can limit global edit permissions to certain groups 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 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 select "ADMIN group" from "Editor Groups" with javascript
And I press the "Save" button And I press the "Save" button
Then pages should not be editable by "AUTHOR" Then pages should not be editable by "AUTHOR"
But pages should be editable by "ADMIN" But pages should be editable by "ADMIN"

View File

@ -1,46 +1,46 @@
Feature: Preview a page Feature: Preview a page
As an author As an author
I want to preview the page I'm editing in the CMS 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 So that I can see how it would look like to my visitors
Background: Background:
Given a "page" "About Us" Given a "page" "About Us"
@javascript @javascript
Scenario: I can show a preview of the current page from the pages section Scenario: I can show a preview of the current page from the pages section
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in the tree Then I should see "About Us" in the tree
When I click on "About Us" in the tree When I click on "About Us" in the tree
And I set the CMS mode to "Preview mode" And I set the CMS mode to "Preview mode"
Then I can see the preview panel Then I can see the preview panel
And the preview contains "About Us" And the preview contains "About Us"
Then I set the CMS mode to "Edit mode" Then I set the CMS mode to "Edit mode"
# TODO: # TODO:
# - Only tests correctly on fresh database # - Only tests correctly on fresh database
# - We should continue testing against it after we have fixtures ready # - We should continue testing against it after we have fixtures ready
@javascript @javascript
Scenario: I can see an updated preview when editing content Scenario: I can see an updated preview when editing content
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in the tree Then I should see "About Us" in the tree
When I click on "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 fill in the "Content" HTML field with "<p>first content</p>"
And I press the "Publish" button And I press the "Publish" button
And I fill in the "Content" HTML field with "my new content" And I fill in the "Content" HTML field with "<p>my new content</p>"
And I press the "Save draft" button And I press the "Save draft" button
And I set the CMS mode to "Preview mode" And I set the CMS mode to "Preview mode"
When I switch the preview to "Published" When I switch the preview to "Published"
Then the preview does not contain "my new content" Then the preview does not contain "my new content"
And the preview contains "first content" And the preview contains "first content"
When I switch the preview to "Draft" When I switch the preview to "Draft"
Then the preview does not contain "first content" Then the preview does not contain "first content"
And the preview contains "my new content" And the preview contains "my new content"
And I set the CMS mode to "Edit mode" And I set the CMS mode to "Edit mode"
Then I should see an edit page form Then I should see an edit page form

View File

@ -1,95 +1,95 @@
Feature: Publish a page Feature: Publish a page
As a site owner As a site owner
I want content to go to a draft site before being published I want content to go to a draft site before being published
So that only high quality changes are seen by our visitors So that only high quality changes are seen by our visitors
Background: Background:
Given a "page" "My Page" with "URLSegment"="my-page" and "Content"="initial content" Given a "page" "My Page" with "URLSegment"="my-page" and "Content"="<p>initial content</p>"
And the "page" "My Page" is not published And the "page" "My Page" is not published
@javascript @javascript
Scenario: I can have a unpublished version of a page that is not publicly available Scenario: I can have a unpublished version of a page that is not publicly available
Given I go to "/my-page" Given I go to "/my-page"
Then the page can't be found Then the page can't be found
@javascript @javascript
Scenario: I can publish a previously never published page Scenario: I can publish a previously never published page
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in the tree And I should see "My Page" in the tree
And I click on "My Page" in the tree And I click on "My Page" in the tree
And I press the "Publish" button And I press the "Publish" button
Then I press the "Log out" button Then I press the "Log out" button
And I go to "/my-page" And I go to "/my-page"
Then I should see "initial content" Then I should see "initial content"
@javascript @javascript
Scenario: I will get different options depending on the current publish state of the page Scenario: I will get different options depending on the current publish state of the page
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in the tree And I should see "My Page" in the tree
And I click on "My Page" in the tree And I click on "My Page" in the tree
When I click "More options" in the "#ActionMenus" element When I click "More options" in the "#ActionMenus" element
Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" 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 "Not published" in the "#ActionMenus_MoreOptions" element
And I should see "Archive" 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 "Save & publish" button
And I should see a "Saved" button And I should see a "Saved" button
When I fill in the "Content" HTML field with "my new content" When I fill in the "Content" HTML field with "<p>my new content</p>"
And I click "More options" in the "#ActionMenus" element And I click "More options" in the "#ActionMenus" element
Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" 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 & publish" button
And I should see a "Save draft" button And I should see a "Save draft" button
When I press the "Publish" button When I press the "Publish" button
And I click "More options" in the "#ActionMenus" element And I click "More options" in the "#ActionMenus" element
Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" 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 "Archive" in the "#ActionMenus_MoreOptions" element
And I should see a "Published" button And I should see a "Published" button
And I should see a "Saved" button And I should see a "Saved" button
@javascript @javascript
Scenario: I can unpublish a page Scenario: I can unpublish a page
Given a "page" "Hello" with "URLSegment"="hello" and "Content"="hello world" Given a "page" "Hello" with "URLSegment"="hello" and "Content"="<p>hello world</p>"
And I go to "/hello" And I go to "/hello"
Then I should see "hello world" Then I should see "hello world"
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "Hello" in the tree And I should see "Hello" in the tree
And I click on "Hello" in the tree And I click on "Hello" in the tree
When I click "More options" in the "#ActionMenus" element When I click "More options" in the "#ActionMenus" element
And I press the "Unpublish" button, confirming the dialog And I press the "Unpublish" button, confirming the dialog
Then I press the "Log out" button Then I press the "Log out" button
And I go to "/hello" And I go to "/hello"
Then the page can't be found Then the page can't be found
@javascript @javascript
Scenario: I can delete a page from live and draft stage to completely remove it Scenario: I can delete a page from live and draft stage to completely remove it
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in the tree And I should see "My Page" in the tree
And I click on "My Page" in the tree And I click on "My Page" in the tree
And I press the "Publish" button And I press the "Publish" button
And I click "More options" in the "#ActionMenus" element And I click "More options" in the "#ActionMenus" element
Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element Then I should see "Unpublish" in the "#ActionMenus_MoreOptions" element
When I press the "Unpublish" button, confirming the dialog When I press the "Unpublish" button, confirming the dialog
And I click "More options" in the "#ActionMenus" element And I click "More options" in the "#ActionMenus" element
Then I should see "Archive" in the "#ActionMenus_MoreOptions" element Then I should see "Archive" in the "#ActionMenus_MoreOptions" element
When I press the "Archive" button, confirming the dialog When I press the "Archive" button, confirming the dialog
Then I should see a "Restore" button Then I should see a "Restore" button
And I should not see a "Published" button And I should not see a "Published" button
And I should not see a "Save & publish" button And I should not see a "Save & publish" button
And I should not see a "Saved" button And I should not see a "Saved" button
And I should not see a "Save draft" button And I should not see a "Save draft" button
When I press the "Restore" button, confirming the dialog When I press the "Restore" button, confirming the dialog
Then I should see a "Save & publish" button Then I should see a "Save & publish" button

View File

@ -1,117 +1,117 @@
Feature: Search for a page Feature: Search for a page
As an author As an author
I want to search for a page in the CMS I want to search for a page in the CMS
So that I can efficiently navigate nested content structures So that I can efficiently navigate nested content structures
Background: Background:
Given a "page" "Home" Given a "page" "Home"
And a "page" "About Us" And a "page" "About Us"
And a "page" "Contact Us" And a "page" "Contact Us"
And I am logged in with "ADMIN" permissions And I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I expand the content filters And I expand the content filters
Scenario: I can search for a page by its title Scenario: I can search for a page by its title
Given I fill in "Search" with "About Us" Given I fill in "Search" with "About Us"
And I press the "Search" button And I press the "Search" button
Then I should see "About Us" in the tree Then I should see "About Us" in the tree
But I should not see "Contact Us" in the tree But I should not see "Contact Us" in the tree
Scenario: I can search for a page by its type Scenario: I can search for a page by its type
Given a "Error Page" "My Error Page" Given a "Error Page" "My Error Page"
When I select "Error Page" from "Page type" When I select "Error Page" from "Page type"
And I press the "Search" button And I press the "Search" button
Then I should see "My Error Page" in the tree Then I should see "My Error Page" in the tree
But I should not see "Contact Us" 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 Scenario: I can search for a page by its oldest last edited date
Given a "page" "Recent Page" Given a "page" "Recent Page"
And a "page" "Old Page" was last edited "7 days ago" And a "page" "Old Page" was last edited "7 days ago"
When I fill in "From" with "the date of 5 days ago" When I fill in "From" with "the date of 5 days ago"
And I press the "Search" button And I press the "Search" button
Then I should see "Recent Page" in the tree Then I should see "Recent Page" in the tree
But I should not see "Old 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 Scenario: I can search for a page by its newest last edited date
Given a "page" "Recent Page" Given a "page" "Recent Page"
And a "page" "Old Page" was last edited "7 days ago" And a "page" "Old Page" was last edited "7 days ago"
When I fill in "To" with "the date of 5 days ago" When I fill in "To" with "the date of 5 days ago"
And I press the "Search" button And I press the "Search" button
Then I should not see "Recent Page" in the tree Then I should not see "Recent Page" in the tree
But I should see "Old Page" in the tree But I should see "Old Page" in the tree
Scenario: I can include deleted pages in my search Scenario: I can include deleted pages in my search
Given a "page" "Deleted Page" Given a "page" "Deleted Page"
And the "page" "Deleted Page" is unpublished And the "page" "Deleted Page" is unpublished
And the "page" "Deleted Page" is deleted And the "page" "Deleted Page" is deleted
When I press the "Search" button When I press the "Search" button
Then I should not see "Deleted Page" in the tree Then I should not see "Deleted Page" in the tree
When I expand the content filters When I expand the content filters
And I select "All pages, including archived" from "Page status" And I select "All pages, including archived" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should see "Deleted Page" in the tree Then I should see "Deleted Page" in the tree
Scenario: I can include only deleted pages in my search Scenario: I can include only deleted pages in my search
Given a "page" "Deleted Page" Given a "page" "Deleted Page"
And the "page" "Deleted Page" is unpublished And the "page" "Deleted Page" is unpublished
And the "page" "Deleted Page" is deleted And the "page" "Deleted Page" is deleted
When I press the "Search" button When I press the "Search" button
Then I should not see "Deleted Page" in the tree Then I should not see "Deleted Page" in the tree
When I expand the content filters When I expand the content filters
And I select "Archived pages" from "Page status" And I select "Archived pages" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should see "Deleted Page" in the tree Then I should see "Deleted Page" in the tree
And I should not see "About Us" in the tree And I should not see "About Us" in the tree
Scenario: I can include draft pages in my search Scenario: I can include draft pages in my search
Given a "page" "Draft Page" Given a "page" "Draft Page"
And the "page" "Draft Page" is not published And the "page" "Draft Page" is not published
When I press the "Search" button When I press the "Search" button
Then I should see "Draft Page" in the tree Then I should see "Draft Page" in the tree
When I expand the content filters When I expand the content filters
And I select "Draft pages" from "Page status" And I select "Draft pages" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should see "Draft Page" in the tree Then I should see "Draft Page" in the tree
And I should not see "About Us" in the tree And I should not see "About Us" in the tree
Scenario: I can include changed pages in my search Scenario: I can include changed pages in my search
When I click on "About Us" in the tree When I click on "About Us" in the tree
Then I should see an edit page form Then I should see an edit page form
When I fill in the "Content" HTML field with "my new content" When I fill in the "Content" HTML field with "<p>my new content</p>"
And I press the "Save draft" button And I press the "Save draft" button
Then I should see "Saved" in the "button#Form_EditForm_action_save" element Then I should see "Saved" in the "button#Form_EditForm_action_save" element
When I go to "/admin/pages" When I go to "/admin/pages"
And I expand the content filters And I expand the content filters
When I select "Modified pages" from "Page status" When I select "Modified pages" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should see "About Us" in the tree Then I should see "About Us" in the tree
And I should not see "Home" in the tree And I should not see "Home" in the tree
Scenario: I can include live pages in my search Scenario: I can include live pages in my search
Given a "page" "Live Page" Given a "page" "Live Page"
And the "page" "Live Page" is published And the "page" "Live Page" is published
And the "page" "Live Page" is deleted And the "page" "Live Page" is deleted
When I press the "Search" button When I press the "Search" button
Then I should not see "Live Page" in the tree Then I should not see "Live Page" in the tree
When I expand the content filters When I expand the content filters
And I select "Live but removed from draft" from "Page status" And I select "Live but removed from draft" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should see "Live Page" in the tree Then I should see "Live Page" in the tree
And I should not see "About Us" in the tree And I should not see "About Us" in the tree
Scenario: I can include only live pages in my search Scenario: I can include only live pages in my search
Given a "page" "Live Page" Given a "page" "Live Page"
And the "page" "Live Page" is published And the "page" "Live Page" is published
And a "page" "Draft Page" And a "page" "Draft Page"
And a "page" "Draft Page" is unpublished And a "page" "Draft Page" is unpublished
And a "page" "Deleted Page" And a "page" "Deleted Page"
And the "page" "Deleted Page" is unpublished And the "page" "Deleted Page" is unpublished
And the "page" "Deleted Page" is deleted And the "page" "Deleted Page" is deleted
When I select "Published pages" from "Page status" When I select "Published pages" from "Page status"
And I press the "Search" button And I press the "Search" button
Then I should not see "Draft Page" in the tree Then I should not see "Draft Page" in the tree
And I should not see "Deleted Page" in the tree And I should not see "Deleted Page" in the tree
But I should see "Live Page" in the tree But I should see "Live Page" in the tree

View File

@ -5,7 +5,7 @@ Feature: View Reports
Background: Background:
Given a "page" "Empty Page" 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 am logged in with "ADMIN" permissions
And I go to "/admin/reports" And I go to "/admin/reports"
@ -15,4 +15,4 @@ Feature: View Reports
But I should not see "Filled Page" But I should not see "Filled Page"
When I follow "Empty Page" When I follow "Empty Page"
Then I should see an edit page form 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"