Línea 1... |
Línea 1... |
1 |
@editor @editor_tiny @_file_upload
|
1 |
@editor @editor_tiny @tiny_autosave
|
2 |
Feature: Tiny editor autosave
|
2 |
Feature: Tiny editor autosave
|
3 |
In order to prevent data loss
|
3 |
In order to prevent data loss
|
4 |
As a content creator
|
4 |
As a content creator
|
5 |
I need my content to be saved automatically
|
5 |
I need my content to be saved automatically
|
Línea 14... |
Línea 14... |
14 |
| teacher2 | Teacher | 2 | teacher2@example.com |
|
14 |
| teacher2 | Teacher | 2 | teacher2@example.com |
|
15 |
And the following "course enrolments" exist:
|
15 |
And the following "course enrolments" exist:
|
16 |
| user | course | role |
|
16 |
| user | course | role |
|
17 |
| teacher1 | C1 | editingteacher |
|
17 |
| teacher1 | C1 | editingteacher |
|
18 |
| teacher2 | C1 | editingteacher |
|
18 |
| teacher2 | C1 | editingteacher |
|
19 |
And the following "blocks" exist:
|
- |
|
20 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
21 |
| private_files | System | 1 | my-index | side-post |
|
- |
|
Línea 22... |
Línea 19... |
22 |
|
19 |
|
23 |
@javascript
|
20 |
@javascript
|
24 |
Scenario: Restore a draft on user profile page
|
21 |
Scenario: Restore a draft on user profile page
|
25 |
Given I log in as "teacher1"
|
22 |
Given I log in as "teacher1"
|
Línea 30... |
Línea 27... |
30 |
And I open my profile in edit mode
|
27 |
And I open my profile in edit mode
|
31 |
Then the field "Description" matches value "This is my draft"
|
28 |
Then the field "Description" matches value "This is my draft"
|
Línea 32... |
Línea 29... |
32 |
|
29 |
|
33 |
@javascript
|
30 |
@javascript
|
- |
|
31 |
Scenario: Do not restore a draft if files have been modified
|
- |
|
32 |
Given the following "user private file" exists:
|
- |
|
33 |
| user | teacher2 |
|
34 |
Scenario: Do not restore a draft if files have been modified
|
34 |
| filepath | lib/editor/tiny/tests/behat/fixtures/tinyscreenshot.png |
|
35 |
Given I am on the "Course 1" course page logged in as teacher1
|
35 |
And I am on the "Course 1" course page logged in as teacher1
|
36 |
And I navigate to "Settings" in current page administration
|
36 |
And I navigate to "Settings" in current page administration
|
37 |
And I set the field "Course summary" to "This is my draft"
|
37 |
And I set the field "Course summary" to "This is my draft"
|
38 |
And I log out
|
- |
|
39 |
And I log in as "teacher2"
|
- |
|
40 |
And I follow "Manage private files..."
|
- |
|
41 |
And I upload "/lib/editor/tiny/tests/behat/fixtures/tinyscreenshot.png" file to "Files" filemanager
|
- |
|
42 |
And I click on "Save changes" "button"
|
38 |
And I log out
|
43 |
And I am on "Course 1" course homepage
|
39 |
And I am on the "Course 1" course page logged in as teacher2
|
44 |
And I navigate to "Settings" in current page administration
|
40 |
And I navigate to "Settings" in current page administration
|
45 |
And I set the field "Course summary" to "<p>Image test</p>"
|
41 |
And I set the field "Course summary" to "<p>Image test</p>"
|
46 |
And I select the "p" element in position "1" of the "Course summary" TinyMCE editor
|
42 |
And I select the "p" element in position "1" of the "Course summary" TinyMCE editor
|
47 |
And I click on the "Image" button for the "Course summary" TinyMCE editor
|
43 |
And I click on the "Image" button for the "Course summary" TinyMCE editor
|
48 |
And I click on "Browse repositories" "button"
|
44 |
And I click on "Browse repositories" "button"
|
49 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
45 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
50 |
And I click on "tinyscreenshot.png" "link"
|
46 |
And I click on "tinyscreenshot.png" "link"
|
51 |
And I click on "Select this file" "button"
|
47 |
And I click on "Select this file" "button"
|
52 |
And I set the field "How would you describe this image to someone who can't see it:" to "It's the Moodle"
|
48 |
And I set the field "How would you describe this image to someone who can't see it?" to "It's the Moodle"
|
53 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
49 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
54 |
And I click on "Save and display" "button"
|
50 |
And I click on "Save and display" "button"
|
55 |
When I am on the "Course 1" course page logged in as teacher1
|
51 |
When I am on the "Course 1" course page logged in as teacher1
|
56 |
And I navigate to "Settings" in current page administration
|
52 |
And I navigate to "Settings" in current page administration
|