MDL-61973 editor_atto: apply string changes to behat tests
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 11 May 2018 23:24:26 +0000 (01:24 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 11 May 2018 23:24:26 +0000 (01:24 +0200)
lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature
lib/editor/atto/plugins/image/tests/behat/image.feature
lib/editor/atto/plugins/media/tests/behat/media.feature
lib/editor/atto/tests/behat/autosave.feature
mod/lesson/tests/behat/duplicate_lesson_page.feature
mod/lesson/tests/behat/questions_images.feature
mod/quiz/tests/behat/manually_mark_question.feature
mod/workshop/tests/behat/embedded_images.feature

index ffb71fb..e2b5c78 100644 (file)
@@ -12,7 +12,7 @@ Feature: Atto accessibility checker
     Then I should see "Images require alternative text."
     And I follow "/broken-image"
     And I wait "2" seconds
-    And I click on "Image" "button"
+    And I click on "Insert or edit image" "button"
     And the field "Enter URL" matches value "/broken-image"
     And I set the field "Describe this image for someone who cannot see it" to "No more warning!"
     And I press "Save image"
@@ -20,7 +20,7 @@ Feature: Atto accessibility checker
     And I should see "Congratulations, no accessibility problems found!"
     And I click on ".moodle-dialogue-focused .closebutton" "css_element"
     And I select the text in the "Description" Atto editor
-    And I click on "Image" "button"
+    And I click on "Insert or edit image" "button"
     And I set the field "Describe this image for someone who cannot see it" to ""
     And I set the field "Description not necessary" to "1"
     And I press "Save image"
index e66929e..941acdf 100644 (file)
@@ -11,7 +11,7 @@ Feature: Add images to Atto
     And I open my profile in edit mode
     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 "Insert or edit image" "button"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle-logo.png" "link"
@@ -43,7 +43,7 @@ Feature: Add images to Atto
     And I click on "Update profile" "button"
     And I click on "Edit profile" "link" in the "region-main" "region"
     And I select the text in the "Description" Atto editor
-    And I click on "Image" "button"
+    And I click on "Insert or edit image" "button"
     Then the field "Describe this image for someone who cannot see it" matches value "It's the Moodle"
     And the field "Width" matches value "123"
     And the field "Height" matches value "456"
@@ -54,7 +54,7 @@ Feature: Add images to Atto
     And I open my profile in edit mode
     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"
+    When I click on "Insert or edit image" "button"
     Then the field "Enter URL" matches value "/nothing/here"
     And I set the field "Describe this image for someone who cannot see it" to "Something"
     And I set the field "Enter URL" to ""
@@ -63,7 +63,7 @@ Feature: Add images to Atto
     And I press "Update profile"
     And I click on "Edit profile" "link" in the "region-main" "region"
     And I select the text in the "Description" Atto editor
-    And I click on "Image" "button"
+    And I click on "Insert or edit 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"
index 03cc0de..d6e42d3 100644 (file)
@@ -17,7 +17,7 @@ Feature: Add media to Atto
     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
     And I set the field "Entry title" to "The best video in the entire world (not really)"
-    And I click on "Media" "button"
+    And I click on "Insert or edit an audio/video file" "button"
 
   @javascript
   Scenario: Insert some media as a link
index a7290d9..3281ba6 100644 (file)
@@ -58,7 +58,7 @@ Feature: Atto Autosave
     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
-    And I click on "Image" "button"
+    And I click on "Insert or edit image" "button"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle-logo.png" "link"
index 3cbc37b..103a371 100644 (file)
@@ -38,7 +38,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
       | id_jumpto_1 | Previous page |
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "id_contents_editor" Atto editor
-    And I click on "Image" "button" in the "[data-fieldtype=editor]" "css_element"
+    And I click on "Insert or edit image" "button" in the "[data-fieldtype=editor]" "css_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
@@ -74,7 +74,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
       | id_score_1 | 0 |
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "id_answer_editor_0" Atto editor
-    And I click on "Image" "button" in the "//*[@id='id_answer_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@id='id_answer_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
@@ -111,7 +111,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
       | id_score_1 | 0 |
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "id_response_editor_0" Atto editor
-    And I click on "Image" "button" in the "//*[@id='id_response_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@id='id_response_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
index 0dc725c..9659dac 100644 (file)
@@ -45,7 +45,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
       | id_score_2 | 0 |
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "id_answer_editor_2" Atto editor
-    And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_answer_editor_2']]" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_answer_editor_2']]" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
@@ -67,7 +67,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
       | id_jumpto_1 | This page |
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "id_response_editor_0" Atto editor
-    And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_response_editor_0']]" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_response_editor_0']]" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
index 5ae87fe..e361b2a 100644 (file)
@@ -73,7 +73,7 @@ Feature: Teachers can override the grade for any question
     And I set the field "Comment" to "Administrator's comment"
     # Atto needs focus to add image, select empty p tag to do so.
     And I select the text in the "Comment" Atto editor
-    And I click on "Image" "button" in the "[data-fieldtype=editor]" "css_element"
+    And I click on "Insert or edit image" "button" in the "[data-fieldtype=editor]" "css_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodle_logo.jpg" "link"
index 4ec1c45..44eb15b 100644 (file)
@@ -29,7 +29,7 @@ Feature: Teachers can embed images into instructions and conclusion fields
     And I expand all fieldsets
     And I set the field "Instructions for submission" to "<p>Image test</p>"
     And I select the text in the "Instructions for submission" Atto editor
-    And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructauthorseditor']]" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructauthorseditor']]" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodlelogo.png" "link"
@@ -42,7 +42,7 @@ Feature: Teachers can embed images into instructions and conclusion fields
     And I expand all fieldsets
     And I set the field "Instructions for assessment" to "<p>Image test</p>"
     And I select the text in the "Instructions for assessment" Atto editor
-    And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructreviewerseditor']]" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructreviewerseditor']]" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodlelogo.png" "link"
@@ -55,7 +55,7 @@ Feature: Teachers can embed images into instructions and conclusion fields
     And I expand all fieldsets
     And I set the field "Conclusion" to "<p>Image test</p>"
     And I select the text in the "Conclusion" Atto editor
-    And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_conclusioneditor']]" "xpath_element"
+    And I click on "Insert or edit image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_conclusioneditor']]" "xpath_element"
     And I click on "Browse repositories..." "button"
     And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
     And I click on "moodlelogo.png" "link"