MDL-44871 Atto behat tests: Modified the tests to work around focus bugs with workspaces
[moodle.git] / lib / editor / atto / plugins / image / tests / behat / image.feature
blob566cc441863dc62195206246b20393db483454cc
1 @atto @atto_image @_file_upload
2 Feature: Add images to Atto
3   To write rich text - I need to add images.
5   @javascript
6   Scenario: Insert an image
7     Given I log in as "admin"
8     And I navigate to "My private files" node in "My profile"
9     And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
10     And I click on "Save changes" "button"
11     When I follow "Admin User"
12     And I follow "Edit profile"
13     And I set the field "Description" to "<p>Image test</p>"
14     And I select the text in the "Description" field
15     And I click on "Image" "button"
16     And I click on "Browse repositories..." "button"
17     And I click on "Private files" "link"
18     And I click on "moodle-logo.png" "link"
19     And I click on "Select this file" "button"
20     And I set the field "Describe this image" to "It's the Moodle"
21     # Wait for the page to "settle".
22     And I wait "2" seconds
23     And I click on "Save image" "button"
24     And I click on "Update profile" "button"
25     And I follow "Edit profile"
26     And I select the text in the "Description" field
27     And I click on "Image" "button"
28     Then the field "Describe this image" matches value "It's the Moodle"