AutorÃa | Ultima modificación | Ver Log |
@core @core_courseformatFeature: Verify that courseindex is usable with the keyboardIn order to use the course indexAs a userI need to be able to navigate it without a mouseBackground:Given the following "course" exists:| fullname | Course 1 || shortname | C1 || category | 0 || enablecompletion | 1 || numsections | 3 || initsections | 1 |And the following "activities" exist:| activity | name | intro | course | idnumber | section || assign | Activity sample 1 | Test assignment description | C1 | sample1 | 1 || book | Activity sample 2 | | C1 | sample2 | 2 || choice | Activity sample 3 | Test choice description | C1 | sample3 | 3 |Given I am on the "C1" "Course" page logged in as "admin"And I change window size to "large"And I click on "Close course index" "button"And I click on "Open course index" "button"And I should see "Section 1" in the "courseindex-content" "region"And the focused element is "[data-preference='drawer-open-index'] .drawertoggle" "css_element"And I press the tab keyAnd I press the tab keyAnd the focused element is ".courseindex-section" "css_element"@javascriptScenario: General focus on open course index.When I press the shift tab keyAnd I press the shift tab keyAnd the focused element is "[data-preference='drawer-open-index'] .drawertoggle" "css_element"And I press enterThen I should not see "Section 1" in the "courseindex-content" "region"@javascript @accessibilityScenario: Course index should be accessible.When I press the shift tab keyAnd I press the shift tab keyAnd I press enterThen the page should meet accessibility standards with "wcag143" extra testsAnd I press enterAnd the page should meet accessibility standards with "wcag143" extra tests@javascriptScenario: Opening and closing sections.When I press the down keyAnd I should see "Activity sample 1" in the "courseindex-content" "region"# Close section with left key.Then I press the left keyAnd I should not see "Activity sample 1" in the "courseindex-content" "region"# Open a section with right keyAnd I press the right keyAnd I should see "Activity sample 1" in the "courseindex-content" "region"# Key down to focus the module and close the section with two left keys.And I press the down keyAnd I press the left keyAnd I press the left keyAnd I should not see "Activity sample 1" in the "courseindex-content" "region"# Open a section using enter key.And I press the down keyAnd I press the left keyAnd I should not see "Activity sample 2" in the "courseindex-content" "region"And I press enterAnd I should see "Activity sample 2" in the "courseindex-content" "region"@javascriptScenario: Enter key should not collapse sections.When I press the down keyAnd I press enterAnd I should see "Activity sample 1" in the "courseindex-content" "region"@javascriptScenario: Navigate to an activity.When I press the down keyAnd I press the right keyAnd I press enterThen I should see "Activity sample 1" in the "page-header" "region"@javascriptScenario: Navigate to first and last element.# Close sections 1 and 3.Given I press the down keyAnd I press the left keyAnd I should not see "Activity sample 1" in the "courseindex-content" "region"And I press the down keyAnd I press the down keyAnd I press the down keyAnd I press the left keyAnd I should not see "Activity sample 3" in the "courseindex-content" "region"# Use end key to go to the last element.When I press the end keyAnd I press the right keyAnd I should see "Activity sample 3" in the "courseindex-content" "region"And I press the left keyThen I should not see "Activity sample 3" in the "courseindex-content" "region"# Use home key to go to the first element.And I press the home keyAnd I press the down keyAnd I press the right keyAnd I should see "Activity sample 1" in the "courseindex-content" "region"@javascriptScenario: Asterisc to open all sections.# Close sections 1 and 2.Given I press the down keyAnd I press the left keyAnd I should not see "Activity sample 1" in the "courseindex-content" "region"And I press the down keyAnd I press the left keyAnd I should not see "Activity sample 2" in the "courseindex-content" "region"And I should see "Activity sample 3" in the "courseindex-content" "region"When I press the multiply keyThen I should see "Activity sample 1" in the "courseindex-content" "region"And I should see "Activity sample 2" in the "courseindex-content" "region"And I should see "Activity sample 3" in the "courseindex-content" "region"