MDL-58265 core_test: replace I turn editing on steps

Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
This commit is contained in:
Simey Lameze 2017-03-15 15:13:09 +08:00 committed by Damyon Wiese
parent 3353cfd8c1
commit fdeeaff954
458 changed files with 1697 additions and 2148 deletions

View file

@ -19,7 +19,7 @@ Feature: Atto Autosave
And I set the field "Autosave frequency" to "3"
And I set the field with xpath "//select[@name='s_editor_atto_autosavefrequency[u]']" to "seconds"
And I click on "Save changes" "button"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field with xpath "//select[@name='summary_editor[format]']" to "1"
And I click on "Save and display" "button"
@ -28,14 +28,14 @@ Feature: Atto Autosave
@javascript
Scenario: Restore a draft
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field "Course summary" to "This is my draft"
# Wait for the autosave
And I wait "5" seconds
And I log out
When I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
# Wait for the autorestore
And I wait "2" seconds
@ -44,7 +44,7 @@ Feature: Atto Autosave
@javascript
Scenario: Do not restore a draft if files have been modified
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field "Course summary" to "This is my draft"
# Wait for the autosave
@ -54,7 +54,7 @@ Feature: Atto Autosave
And I follow "Manage private files..."
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
And I click on "Save changes" "button"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field "Course summary" to "<p>Image test</p>"
And I select the text in the "Course summary" Atto editor
@ -70,27 +70,27 @@ Feature: Atto Autosave
And I click on "Save and display" "button"
And I log out
When I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
Then I should not see "This is my draft"
@javascript
Scenario: Do not restore a draft if text has been modified
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field "Course summary" to "This is my draft"
# Wait for the autosave
And I wait "5" seconds
And I log out
And I log in as "teacher2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field "Course summary" to "Modified text"
And I click on "Save and display" "button"
And I log out
When I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
Then I should not see "This is my draft"
And I should see "Modified text"

View file

@ -13,7 +13,7 @@ Feature: Atto editor with customised toolbar
| activity | name | intro | course | idnumber |
| label | L1 | <a href="../lib/editor/atto/tests/fixtures/custom_toolbar_example.php">FixtureLink</a> | C1 | label1 |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "FixtureLink"
@javascript

View file

@ -18,8 +18,7 @@ Feature: Add or remove items from the TinyMCE editor toolbar
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 course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add a "Database" to section "1"
Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist
And "#id_introeditor_tbl .mce_fullscreen" "css_element" should exist
@ -28,21 +27,19 @@ Feature: Add or remove items from the TinyMCE editor toolbar
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 course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add a "Database" to section "1"
Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist
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 course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Database" to section "1"
And "#id_introeditor_tbl .mce_anchor" "css_element" should not exist
And I press "Cancel"
Scenario: Default icons
Given I am on course page "Course 1"
And I turn editing mode on
Given I am on "Course 1" course homepage with editing mode on
When I add a "Database" to section "1"
And I wait until "#id_introeditor_tbl" "css_element" exists
Then "#id_introeditor_tbl .mce_bold" "css_element" should exist