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

@ -20,7 +20,7 @@ Feature: Edit a page
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 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

View File

@ -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,7 +13,7 @@ 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"
@ -27,7 +27,7 @@ Feature: Insert an image into a page
@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,24 +1,24 @@
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"
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
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
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
@ -28,7 +28,7 @@ Scenario: I can limit global view permissions to logged-in users
And I go to the homepage
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
And I select "AUTHOR group" from "Viewer Groups" with javascript
And I press the "Save" button
@ -43,13 +43,13 @@ Scenario: I can limit global view permissions to certain groups
And I go to the homepage
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
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
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

View File

@ -28,9 +28,9 @@ Feature: Preview a page
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 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 "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 set the CMS mode to "Preview mode"

View File

@ -1,10 +1,10 @@
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"
Given a "page" "My Page" with "URLSegment"="my-page" and "Content"="<p>initial content</p>"
And the "page" "My Page" is not published
@javascript
@ -39,7 +39,7 @@ So that only high quality changes are seen by our visitors
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"
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
@ -54,7 +54,7 @@ So that only high quality changes are seen by our visitors
@javascript
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"
Then I should see "hello world"

View File

@ -78,7 +78,7 @@ Feature: Search for a page
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"
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

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"