1 |
efrain |
1 |
@block @block_accessreview @javascript
|
|
|
2 |
Feature: Block accessreview results
|
|
|
3 |
In order to overview accessibility information on my course
|
|
|
4 |
As a manager
|
|
|
5 |
I can add the accessreview block in a course after running the scheduled task
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And the following "activities" exist:
|
|
|
12 |
| activity | name | intro | course | idnumber |
|
|
|
13 |
| label | Label one | <b>Bold text is bold.</b> | C1 | id001 |
|
|
|
14 |
| label | Label two | <a href="modle.org">Click here</a> | C1 | id002 |
|
|
|
15 |
And I run the scheduled task "\tool_brickfield\task\process_analysis_requests"
|
|
|
16 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
|
|
|
17 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_caches"
|
|
|
18 |
|
|
|
19 |
Scenario: View accessreview block results on a course
|
|
|
20 |
Given I log in as "admin"
|
|
|
21 |
And I navigate to "Plugins > Admin tools > Accessibility > Brickfield registration" in site administration
|
|
|
22 |
And I set the field "id_key" to "123456789012345678901234567890ab"
|
|
|
23 |
And I set the field "id_hash" to "ab123456789012345678901234567890"
|
|
|
24 |
And I press "Activate"
|
|
|
25 |
Then I should see "Your accessibility toolkit is still being validated."
|
|
|
26 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
27 |
When I add the "Accessibility Review" block
|
|
|
28 |
Then I should see "Accessibility Review"
|
|
|
29 |
And I press "Submit for analysis"
|
|
|
30 |
Then I should see "This course has been scheduled for analysis."
|
|
|
31 |
And I run the scheduled task "\tool_brickfield\task\process_analysis_requests"
|
|
|
32 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
|
|
|
33 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_caches"
|
|
|
34 |
And I reload the page
|
|
|
35 |
And I should see "Image" in the "Accessibility Review" "block"
|
|
|
36 |
And I should see "Layout" in the "Accessibility Review" "block"
|
|
|
37 |
And I should see "Link" in the "Accessibility Review" "block"
|
|
|
38 |
And I should see "Media" in the "Accessibility Review" "block"
|
|
|
39 |
And I should see "Table" in the "Accessibility Review" "block"
|
|
|
40 |
And I should see "Text" in the "Accessibility Review" "block"
|
|
|
41 |
# We created one link error above.
|
|
|
42 |
And I should see "1" in the "Link" "table_row"
|
|
|
43 |
# We created one text issue, and the standard Behat course generator creates another (too much content).
|
|
|
44 |
And I should see "2" in the "Text" "table_row"
|
|
|
45 |
And "View Brickfield Accessibility Report" "icon" should exist in the "Accessibility Review" "block"
|
|
|
46 |
And "Toggle Brickfield Accessibility Heatmap" "icon" should exist in the "Accessibility Review" "block"
|
|
|
47 |
And "Download Brickfield Accessibility Report" "icon" should exist in the "Accessibility Review" "block"
|
|
|
48 |
|
|
|
49 |
Scenario: Toggle highlighting on/off
|
|
|
50 |
Given I log in as "admin"
|
|
|
51 |
Given the following "user preferences" exist:
|
|
|
52 |
| user | preference | value |
|
|
|
53 |
| admin | block_accessreviewtogglestate | 0 |
|
|
|
54 |
And I navigate to "Plugins > Admin tools > Accessibility > Brickfield registration" in site administration
|
|
|
55 |
And I set the field "id_key" to "123456789012345678901234567890ab"
|
|
|
56 |
And I set the field "id_hash" to "ab123456789012345678901234567890"
|
|
|
57 |
And I press "Activate"
|
|
|
58 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
59 |
When I add the "Accessibility Review" block
|
|
|
60 |
And I press "Submit for analysis"
|
|
|
61 |
And I run the scheduled task "\tool_brickfield\task\process_analysis_requests"
|
|
|
62 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
|
|
|
63 |
And I run the scheduled task "\tool_brickfield\task\bulk_process_caches"
|
|
|
64 |
And I reload the page
|
|
|
65 |
And I click on "Toggle Brickfield Accessibility Heatmap" "icon"
|
|
|
66 |
And ".block_accessreview_view" "css_element" should be visible
|
|
|
67 |
And I click on "Toggle Brickfield Accessibility Heatmap" "icon"
|
|
|
68 |
And ".block_accessreview_view" "css_element" should not be visible
|