Línea 8... |
Línea 8... |
8 |
Scenario: Embedding the image into the instructions and conclusions fields
|
8 |
Scenario: Embedding the image into the instructions and conclusions fields
|
9 |
Given the following "users" exist:
|
9 |
Given the following "users" exist:
|
10 |
| username | firstname | lastname | email |
|
10 |
| username | firstname | lastname | email |
|
11 |
| teacher1 | Teacher | One | teacher1@example.com |
|
11 |
| teacher1 | Teacher | One | teacher1@example.com |
|
12 |
And the following "user private files" exist:
|
12 |
And the following "user private files" exist:
|
13 |
| user | filepath | filename |
|
13 |
| user | filepath |
|
14 |
| teacher1 | mod/workshop/tests/fixtures/moodlelogo.png | moodlelogo.png |
|
14 |
| teacher1 | mod/workshop/tests/fixtures/moodlelogo.png |
|
15 |
And the following "courses" exist:
|
15 |
And the following "courses" exist:
|
16 |
| fullname | shortname |
|
16 |
| fullname | shortname |
|
17 |
| Course 1 | C1 |
|
17 |
| Course 1 | C1 |
|
18 |
And the following "course enrolments" exist:
|
18 |
And the following "course enrolments" exist:
|
19 |
| user | course | role |
|
19 |
| user | course | role |
|
20 |
| teacher1 | C1 | editingteacher |
|
20 |
| teacher1 | C1 | editingteacher |
|
21 |
And the following "blocks" exist:
|
- |
|
22 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
23 |
| private_files | System | 1 | my-index | side-post |
|
- |
|
24 |
And the following "activities" exist:
|
21 |
And the following "activities" exist:
|
25 |
| activity | course | name |
|
22 |
| activity | course | name |
|
26 |
| workshop | C1 | Workshop with embedded images |
|
23 |
| workshop | C1 | Workshop with embedded images |
|
27 |
And I am on the "Workshop with embedded images" "workshop activity editing" page logged in as admin
|
24 |
And I am on the "Workshop with embedded images" "workshop activity editing" page logged in as admin
|
28 |
And I set the following fields to these values:
|
25 |
And I set the following fields to these values:
|
Línea 38... |
Línea 35... |
38 |
And I click on "Image" "button" in the "Instructions for submission" "form_row"
|
35 |
And I click on "Image" "button" in the "Instructions for submission" "form_row"
|
39 |
And I click on "Browse repositories" "button"
|
36 |
And I click on "Browse repositories" "button"
|
40 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
37 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
41 |
And I click on "moodlelogo.png" "link"
|
38 |
And I click on "moodlelogo.png" "link"
|
42 |
And I click on "Select this file" "button"
|
39 |
And I click on "Select this file" "button"
|
43 |
And I set the field "How would you describe this image to someone who can't see it:" to "How to submit"
|
40 |
And I set the field "How would you describe this image to someone who can't see it?" to "How to submit"
|
44 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
41 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
45 |
And I press "Save and display"
|
42 |
And I press "Save and display"
|
46 |
# Embed the image into Instructions for assessment.
|
43 |
# Embed the image into Instructions for assessment.
|
47 |
And I navigate to "Settings" in current page administration
|
44 |
And I navigate to "Settings" in current page administration
|
48 |
And I expand all fieldsets
|
45 |
And I expand all fieldsets
|
49 |
And I click on "Image" "button" in the "Instructions for assessment" "form_row"
|
46 |
And I click on "Image" "button" in the "Instructions for assessment" "form_row"
|
50 |
And I click on "Browse repositories" "button"
|
47 |
And I click on "Browse repositories" "button"
|
51 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
48 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
52 |
And I click on "moodlelogo.png" "link"
|
49 |
And I click on "moodlelogo.png" "link"
|
53 |
And I click on "Select this file" "button"
|
50 |
And I click on "Select this file" "button"
|
54 |
And I set the field "How would you describe this image to someone who can't see it:" to "How to assess"
|
51 |
And I set the field "How would you describe this image to someone who can't see it?" to "How to assess"
|
55 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
52 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
56 |
And I press "Save and display"
|
53 |
And I press "Save and display"
|
57 |
# Embed the image into Conclusion.
|
54 |
# Embed the image into Conclusion.
|
58 |
And I navigate to "Settings" in current page administration
|
55 |
And I navigate to "Settings" in current page administration
|
59 |
And I expand all fieldsets
|
56 |
And I expand all fieldsets
|
60 |
And I click on "Image" "button" in the "Conclusion" "form_row"
|
57 |
And I click on "Image" "button" in the "Conclusion" "form_row"
|
61 |
And I click on "Browse repositories" "button"
|
58 |
And I click on "Browse repositories" "button"
|
62 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
59 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
63 |
And I click on "moodlelogo.png" "link"
|
60 |
And I click on "moodlelogo.png" "link"
|
64 |
And I click on "Select this file" "button"
|
61 |
And I click on "Select this file" "button"
|
65 |
And I set the field "How would you describe this image to someone who can't see it:" to "Well done"
|
62 |
And I set the field "How would you describe this image to someone who can't see it?" to "Well done"
|
66 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
63 |
And I click on "Save" "button" in the "Image details" "dialogue"
|
67 |
And I press "Save and display"
|
64 |
And I press "Save and display"
|
68 |
# Save the form and check the images are displayed in appropriate phases.
|
65 |
# Save the form and check the images are displayed in appropriate phases.
|
69 |
And I change phase in workshop "Workshop with embedded images" to "Submission phase"
|
66 |
And I change phase in workshop "Workshop with embedded images" to "Submission phase"
|
70 |
Then "//*[contains(@class, 'instructions')]//img[contains(@src, 'pluginfile.php') and contains(@src, '/mod_workshop/instructauthors/moodlelogo.png') and @alt='How to submit']" "xpath_element" should exist
|
67 |
Then "//*[contains(@class, 'instructions')]//img[contains(@src, 'pluginfile.php') and contains(@src, '/mod_workshop/instructauthors/moodlelogo.png') and @alt='How to submit']" "xpath_element" should exist
|