Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 the following config values are set as admin:
16
      | analysistype | 1 | tool_brickfield |
17
 
18
  Scenario: View accessreview block results on a course
19
    Given I log in as "admin"
20
    And I navigate to "Plugins > Admin tools > Accessibility > Brickfield registration" in site administration
21
    And I set the field "id_key" to "123456789012345678901234567890ab"
22
    And I set the field "id_hash" to "ab123456789012345678901234567890"
23
    And I press "Activate"
24
    Then I should see "Your accessibility toolkit is functional while being validated."
25
    And I am on "Course 1" course homepage with editing mode on
26
    When I add the "Accessibility review" block
27
    Then I should see "Accessibility review"
28
    And I press "Submit for analysis"
29
    Then I should see "This course has been scheduled for analysis."
30
    And I run the scheduled task "\tool_brickfield\task\process_analysis_requests"
31
    And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
32
    And I run the scheduled task "\tool_brickfield\task\bulk_process_caches"
33
    And I reload the page
34
    And I should see "Image" in the "Accessibility review" "block"
35
    And I should see "Layout" in the "Accessibility review" "block"
36
    And I should see "Link" in the "Accessibility review" "block"
37
    And I should see "Media" in the "Accessibility review" "block"
38
    And I should see "Table" in the "Accessibility review" "block"
39
    And I should see "Text" in the "Accessibility review" "block"
40
    # We created one link error above.
41
    And I should see "1" in the "Link" "table_row"
42
    # We created one text issue, and the standard Behat course generator creates another (too much content).
43
    And I should see "2" in the "Text" "table_row"
44
    And "View accessibility toolkit" "icon" should exist in the "Accessibility review" "block"
45
    And "Toggle accessibility heatmap" "icon" should exist in the "Accessibility review" "block"
46
    And "Download accessibility summary report" "icon" should exist in the "Accessibility review" "block"
47
 
48
  Scenario: Toggle highlighting on/off
49
    Given I log in as "admin"
50
    Given the following "user preferences" exist:
51
      | user  | preference                    | value |
52
      | admin | block_accessreviewtogglestate | 0     |
53
    And I navigate to "Plugins > Admin tools > Accessibility > Brickfield registration" in site administration
54
    And I set the field "id_key" to "123456789012345678901234567890ab"
55
    And I set the field "id_hash" to "ab123456789012345678901234567890"
56
    And I press "Activate"
57
    And I am on "Course 1" course homepage with editing mode on
58
    When I add the "Accessibility review" block
59
    And I press "Submit for analysis"
60
    And I run the scheduled task "\tool_brickfield\task\process_analysis_requests"
61
    And I run the scheduled task "\tool_brickfield\task\bulk_process_courses"
62
    And I run the scheduled task "\tool_brickfield\task\bulk_process_caches"
63
    And I reload the page
64
    And I click on "Toggle accessibility heatmap" "icon"
65
    And ".block_accessreview_view" "css_element" should be visible
66
    And I click on "Toggle accessibility heatmap" "icon"
67
    And ".block_accessreview_view" "css_element" should not be visible