Línea 50... |
Línea 50... |
50 |
Given I log in as "admin"
|
50 |
Given I log in as "admin"
|
51 |
And I open my profile in edit mode
|
51 |
And I open my profile in edit mode
|
52 |
When I set the field "Description" to "<p>Some plain text</p><img src='/broken-image' width='1' height='1' class='behat-tinymce-placeholder'/><p>Some more text</p>"
|
52 |
When I set the field "Description" to "<p>Some plain text</p><img src='/broken-image' width='1' height='1' class='behat-tinymce-placeholder'/><p>Some more text</p>"
|
53 |
And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
|
53 |
And I click on the "Tools > Accessibility checker" menu item for the "Description" TinyMCE editor
|
54 |
Then I should see "Congratulations, no accessibility issues found!" in the "Accessibility checker" "dialogue"
|
54 |
Then I should see "Congratulations, no accessibility issues found!" in the "Accessibility checker" "dialogue"
|
- |
|
55 |
|
- |
|
56 |
@javascript
|
- |
|
57 |
Scenario: Permissions can be configured to control access to accessibility checker
|
- |
|
58 |
Given the following "users" exist:
|
- |
|
59 |
| username | firstname | lastname | email |
|
- |
|
60 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
- |
|
61 |
| teacher2 | Teacher | 2 | teacher2@example.com |
|
- |
|
62 |
And the following "courses" exist:
|
- |
|
63 |
| fullname | shortname | format |
|
- |
|
64 |
| Course 1 | C1 | topics |
|
- |
|
65 |
And the following "roles" exist:
|
- |
|
66 |
| name | shortname | description | archetype |
|
- |
|
67 |
| Custom teacher | custom1 | Limited permissions | editingteacher |
|
- |
|
68 |
And the following "course enrolments" exist:
|
- |
|
69 |
| user | course | role |
|
- |
|
70 |
| teacher1 | C1 | editingteacher |
|
- |
|
71 |
| teacher2 | C1 | custom1 |
|
- |
|
72 |
And the following "activity" exists:
|
- |
|
73 |
| activity | assign |
|
- |
|
74 |
| course | C1 |
|
- |
|
75 |
| name | Test assignment |
|
- |
|
76 |
And the following "permission overrides" exist:
|
- |
|
77 |
| capability | permission | role | contextlevel | reference |
|
- |
|
78 |
| tiny/accessibilitychecker:use | Prohibit | custom1 | Course | C1 |
|
- |
|
79 |
# Check plugin access as a role with prohibited permissions.
|
- |
|
80 |
And I log in as "teacher2"
|
- |
|
81 |
And I am on the "Test assignment" Activity page
|
- |
|
82 |
And I navigate to "Settings" in current page administration
|
- |
|
83 |
When I click on the "Tools" menu item for the "Activity instructions" TinyMCE editor
|
- |
|
84 |
Then I should not see "Accessibility checker"
|
- |
|
85 |
# Check plugin access as a role with allowed permissions.
|
- |
|
86 |
And I log in as "teacher1"
|
- |
|
87 |
And I am on the "Test assignment" Activity page
|
- |
|
88 |
And I navigate to "Settings" in current page administration
|
- |
|
89 |
And I click on the "Tools" menu item for the "Activity instructions" TinyMCE editor
|
- |
|
90 |
And I should see "Accessibility checker"
|