@javascript
Scenario: Images with no alt
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Some plain text</p><img src='/broken-image' width='1' height='1'/><p>Some more text</p>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: Low contrast
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p style='color: #7c7cff; background-color: #ffffff;'>Hard to read</p>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: No headings
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.</p><p>Jelly beans gingerbread tootsie roll. Sugar plum tiramisu cotton candy toffee pie cotton candy tiramisu. Carrot cake chocolate bar sesame snaps cupcake cake dessert sweet fruitcake wafer. Marshmallow cupcake gingerbread pie sweet candy canes powder gummi bears. Jujubes cake muffin marshmallow candy jelly beans tootsie roll pie. Gummi bears applicake chocolate cake sweet jelly sesame snaps lollipop lollipop carrot cake. Marshmallow cake jelly beans. Jelly beans sesame snaps muffin halvah cookie ice cream candy canes carrot cake. Halvah donut marshmallow tiramisu. Cookie dessert gummi bears. Sugar plum apple pie jelly beans gummi bears tart chupa chups. Liquorice macaroon gummi bears gummies macaroon marshmallow sweet roll cake topping. Lemon drops caramels pie icing danish. Chocolate cake oat cake dessert halvah danish carrot cake apple pie.</p>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: Merged cells
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<table><caption>Dogs that look good in pants</caption><tr><th>Breed</th><th>Coolness</th></tr><tr><td>Poodle</td><td rowspan='2'>NOT COOL</td></tr><tr><td>Doberman</td></tr></table>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: Table missing row/column headers
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<table><caption>Dogs that look good in pants</caption><tr><th>Breed</th><td>Coolness</td></tr><tr><td>Poodle</td><td>NOT COOL</td></tr><tr><td>Doberman</td><td>COOL</td></tr></table>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: Table missing caption
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<table><tr><th>Breed</th><th>Coolness</th></tr><tr><td>Poodle</td><td>NOT COOL</td></tr><tr><td>Doberman</td><td>COOL</td></tr></table>"
When I click on "Show more buttons" "button"
And I click on "Accessibility checker" "button"
@javascript
Scenario: Images and links
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Some plain text</p><img src='/broken-image' alt='Image 1'/><p><a href='#fsd'>Some link text</a></p>"
And I select the text in the "Description" Atto editor
When I click on "Show more buttons" "button"
@javascript
Scenario: Styles
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Some plain text</p>"
When I click on "Show more buttons" "button"
And I select the text in the "Description" Atto editor
@javascript
Scenario: Right align some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Fascism</p>"
- And I set the field "Text editor" to "Plain text area"
And I click on "Show more buttons" "button"
And I select the text in the "Description" Atto editor
When I click on "Right align" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "style=\"text-align:right;\""
@javascript
Scenario: Left align some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Communism</p>"
- And I set the field "Text editor" to "Plain text area"
And I click on "Show more buttons" "button"
And I select the text in the "Description" Atto editor
When I click on "Right align" "button"
And I click on "Left align" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "style=\"text-align:left;\""
@javascript
Scenario: Center align some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>United Future</p>"
- And I set the field "Text editor" to "Plain text area"
And I click on "Show more buttons" "button"
And I select the text in the "Description" Atto editor
When I click on "Center" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "style=\"text-align:center;\""
@javascript
Scenario: Bold some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Badger"
And I select the text in the "Description" Atto editor
When I click on "Bold" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<b>Badger</b>"
@javascript
Scenario: Unbold some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Mouse"
And I select the text in the "Description" Atto editor
When I click on "Bold" "button"
And I click on "Bold" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should not see "<b>Mouse</b>"
And I should see "Mouse"
@javascript
Scenario: Insert symbols
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>1980 Mullet</p>"
And I select the text in the "Description" Atto editor
When I click on "Show more buttons" "button"
And I click on "Insert character" "button"
And I click on "a - macron" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "ā"
@javascript
Scenario: Clear formatting
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Pisa"
And I select the text in the "Description" Atto editor
And I click on "Italic" "button"
And I select the text in the "Description" Atto editor
When I click on "Clear formatting" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should not see "<i>Pisa"
@javascript
Scenario: Toggle toolbar
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
When I click on "Show more buttons" "button"
Then "Equation editor" "button" should be visible
And I click on "Show fewer buttons" "button"
@javascript
Scenario: Create an equation
Given I log in as "admin"
- When I navigate to "Edit profile" node in "My profile settings"
+ When I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Equation test</p>"
# Set field on the bottom of page, so equation editor dialogue is visible.
And I expand all fieldsets
And I click on "\infty" "button"
And I click on "Save equation" "button"
And I click on "Update profile" "button"
+ And I follow "My profile" in the user menu
Then "\infty" "text" should exist
@javascript
Scenario: Edit an equation
Given I log in as "admin"
- When I navigate to "Edit profile" node in "My profile settings"
+ When I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>\( \pi \)</p>"
# Set field on the bottom of page, so equation editor dialogue is visible.
And I expand all fieldsets
@javascript
Scenario: Edit the html source
Given I log in as "admin"
- When I navigate to "Edit profile" node in "My profile settings"
+ When I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p style=\"color: blue;\">Smurf</p>"
And I click on "Show more buttons" "button"
And I click on "HTML" "button"
@javascript
Scenario: Insert an image
Given I log in as "admin"
- And I navigate to "My private files" node in "My profile"
+ And I follow "Manage my private files..."
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
And I click on "Save changes" "button"
- When I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Description" to "<p>Image test</p>"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
+ When I set the field "Description" to "<p>Image test</p>"
And I select the text in the "Description" Atto editor
And I click on "Image" "button"
And I click on "Browse repositories..." "button"
@javascript
Scenario: Manually inserting an image
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "<p>Image: <img src='/nothing/here'>.</p>"
And I select the text in the "Description" Atto editor
When I click on "Image" "button"
And the field "Enter URL" matches value "/nothing/again"
And the field "Width" matches value "123"
And the field "Height" matches value "456"
- And the field "Describe this image" matches value "Awesome!"
\ No newline at end of file
+ And the field "Describe this image" matches value "Awesome!"
@javascript
Scenario: Indent
Given I log in as "admin"
- When I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ When I follow "Edit profile"
And I set the field "Description" to "<p>I need some space.</p>"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
And I click on "Indent" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "class=\"editor-indent\""
@javascript
Scenario: Indent and outdent
Given I log in as "admin"
- When I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ When I follow "Edit profile"
And I set the field "Description" to "<p>I need some space.</p>"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
And I click on "Indent" "button"
And I click on "Outdent" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should not see "class=\"editor-indent\""
@javascript
Scenario: Italicise some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Tower of Pisa"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
When I click on "Italic" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<i>Tower of Pisa</i>"
@javascript
Scenario: Toggle italics in some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "GHD - for hair"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
When I click on "Italic" "button"
And I click on "Italic" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should not see "<i>GHD - for hair</i>"
And I should see "GHD - for hair"
@javascript
Scenario: Insert a links
Given I log in as "admin"
- And I navigate to "My private files" node in "My profile"
+ And I follow "Manage my private files..."
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
And I click on "Save changes" "button"
- When I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ When I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Super cool"
And I select the text in the "Description" Atto editor
And I click on "Link" "button"
And I click on "moodle-logo.png" "link"
And I click on "Select this file" "button"
And I click on "Update profile" "button"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "Super cool</a>"
@javascript
Scenario: Insert some media
Given I log in as "admin"
- And I navigate to "My private files" node in "My profile"
+ And I follow "Manage my private files..."
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.webm" file to "Files" filemanager
And I click on "Save changes" "button"
- When I am on homepage
- And I expand "My profile" node
- And I expand "Blogs" node
+ When I follow "My profile" in the user menu
+ And I follow "My blog entries"
And I follow "Add a new entry"
And I set the field "Blog entry body" to "<p>Media test</p>"
And I select the text in the "Blog entry body" Atto editor
@javascript
Scenario: Make a list from some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Have you heard the news everyone's talking<br/> Life is good 'cause everything's awesome<br/>"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
When I click on "Ordered list" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<ol><li>Have you heard the news everyone's talking"
@javascript
Scenario: Strike some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "MUA"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
When I click on "Strike through" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<strike>MUA</strike>"
@javascript
Scenario: Subscript some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Submarine"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
When I click on "Subscript" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<sub>Submarine</sub>"
@javascript
Scenario: Subscript some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Helicopter"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
When I click on "Superscript" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<sup>Helicopter</sup>"
@javascript
Scenario: Create a table
Given I log in as "admin"
- And I am on homepage
- And I expand "My profile" node
- And I expand "Blogs" node
+ And I follow "My profile" in the user menu
+ And I follow "My blog entries"
And I follow "Add a new entry"
And I set the field "Entry title" to "How to make a table"
And I set the field "Blog entry body" to "Table test"
@javascript
Scenario: Edit a table
Given I log in as "admin"
- And I am on homepage
- And I expand "My profile" node
- And I expand "Blogs" node
+ And I follow "My profile" in the user menu
+ And I follow "My blog entries"
And I follow "Add a new entry"
And I set the field "Entry title" to "How to make a table"
And I set the field "Blog entry body" to "<table><tr><td>Cell</td></tr></table>"
@javascript
Scenario: Create a heading
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
- And I set the field "Text editor" to "Plain text area"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "How The Rock Has Made the WWE World Heavyweight Title More Important Than Ever"
And I select the text in the "Description" Atto editor
When I click on "Paragraph styles" "button"
When I click on "Heading (large)" "link"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<h3>How The Rock"
@javascript
Scenario: Underline some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Deprecated HTML Tag"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
And I click on "Show more buttons" "button"
When I click on "Underline" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<u>Deprecated HTML Tag</u>"
@javascript
Scenario: Make a list from some text
Given I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My profile" in the user menu
+ And I follow "Edit profile"
And I set the field "Description" to "Things, dogs, clogs, they're awesome<br/> Rocks, clocks, and socks, they're awesome<br/> Figs, and wigs, and twigs, that's awesome<br/> Everything you see or think or say is awesome"
- And I set the field "Text editor" to "Plain text area"
And I select the text in the "Description" Atto editor
When I click on "Unordered list" "button"
And I press "Update profile"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
+ And I set the field "Text editor" to "Plain text area"
+ And I press "Save changes"
And I follow "Edit profile"
Then I should see "<ul><li>Things, dogs, clogs"
-@editor @editor_tinymce
+@editor @editor_tinymce @javascript
Feature: Add or remove items from the TinyMCE editor toolbar
In order to customize the TinyMCE editor appearance
As an admin
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
- And I navigate to "Edit profile" node in "My profile settings"
+ And I follow "My preferences" in the user menu
+ And I follow "Editor preferences"
And I set the field "Text editor" to "TinyMCE HTML editor"
- And I press "Update profile"
+ And I press "Save changes"
And I follow "Home"
- @javascript
Scenario: Remove icons
When the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce |
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Database" to section "1"
And "#id_introeditor_tbl .mce_fullscreen" "css_element" should exist
And I press "Cancel"
- @javascript
Scenario: Add icons
When the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen,anchor | editor_tinymce |
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Database" to section "1"
And "#id_introeditor_tbl .mce_anchor" "css_element" should exist
And the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce |
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I add a "Database" to section "1"
And "#id_introeditor_tbl .mce_anchor" "css_element" should not exist
And I press "Cancel"
- @javascript
Scenario: Default icons
+ And I am on site homepage
Given I follow "Course 1"
And I turn editing mode on
When I add a "Database" to section "1"