AutorÃa | Ultima modificación | Ver Log |
@tool_behatFeature: Verify that keyboard steps work as expectedIn order to use behat step definitionsAs a test writerI need to verify that the keyboard steps work as expected@javascriptScenario: Typing keys into a field causes them to be inputGiven the following "users" exist:| username | email | firstname | lastname | password || saffronr | saffron.rutledge@example.com | Saffron | Rutledge | flowerpower |Given I click on "Log in" "link"And I click on "Username" "field"When I type "saffronr"And I press the tab keyAnd I type "flowerpower"And I press enterThen I should see "You are logged in as Saffron Rutledge"@javascriptScenario: Using tab changes focus to the next or previous fieldGiven I click on "Log in" "link"And I click on "Username" "field"And the focused element is "Username" "field"When I press the tab keyThen the focused element is "Password" "field"And I press the shift tab keyAnd the focused element is "Username" "field"@javascriptScenario: Using the arrow keys allows me to navigate through menusGiven the following "users" exist:| username | email | firstname | lastname || saffronr | saffron.rutledge@example.com | Saffron | Rutledge |And I log in as "saffronr"And I click on "User menu" "button" in the ".usermenu" "css_element"When I press the up keyThen the focused element is "Log out" "link"@javascriptScenario: The escape key can be used to close a dialogueGiven the following "course" exists:| fullname | C1|| shortname | C1 |And I log in as "admin"And I am on "C1" course homepageAnd I navigate to course participantsAnd I press "Enrol users"And "Enrol users" "dialogue" should be visibleWhen I press the escape keyThen "Enrol users" "dialogue" should not be visible