Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool_behat
2
Feature: Verify that keyboard steps work as expected
3
  In order to use behat step definitions
4
  As a test writer
5
  I need to verify that the keyboard steps work as expected
6
 
7
  @javascript
8
  Scenario: Typing keys into a field causes them to be input
9
    Given the following "users" exist:
10
      | username | email                        | firstname | lastname | password    |
11
      | saffronr | saffron.rutledge@example.com | Saffron   | Rutledge | flowerpower |
12
    Given I click on "Log in" "link"
13
    And I click on "Username" "field"
14
    When I type "saffronr"
15
    And I press the tab key
16
    And I type "flowerpower"
17
    And I press enter
18
    Then I should see "You are logged in as Saffron Rutledge"
19
 
20
  @javascript
21
  Scenario: Using tab changes focus to the next or previous field
22
    Given I click on "Log in" "link"
23
    And I click on "Username" "field"
24
    And the focused element is "Username" "field"
25
    When I press the tab key
26
    Then the focused element is "Password" "field"
27
 
28
    And I press the shift tab key
29
    And the focused element is "Username" "field"
30
 
31
  @javascript
32
  Scenario: Using the arrow keys allows me to navigate through menus
33
    Given the following "users" exist:
34
      | username | email                        | firstname | lastname |
35
      | saffronr | saffron.rutledge@example.com | Saffron   | Rutledge |
36
    And I log in as "saffronr"
37
    And I click on "User menu" "button" in the ".usermenu" "css_element"
38
    When I press the up key
39
    Then the focused element is "Log out" "link"
40
 
41
  @javascript
42
  Scenario: The escape key can be used to close a dialogue
43
    Given the following "course" exists:
44
     | fullname  | C1|
45
     | shortname | C1 |
46
    And I log in as "admin"
47
    And I am on "C1" course homepage
48
    And I navigate to course participants
49
    And I press "Enrol users"
50
    And "Enrol users" "dialogue" should be visible
51
    When I press the escape key
52
    Then "Enrol users" "dialogue" should not be visible