AutorÃa | Ultima modificación | Ver Log |
@tool_behatFeature: Verify that the behat login and logout steps work as expectedIn order to use behat login and log out stepsAs a test writerI need to verify that login and logout happen when the steps are usedScenario: Log in as a user using the stepGiven the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |When I log in as "traverst1"Then I should see "Thomas Travers"@javascriptScenario: Log in as a user using the step (javascript)Given the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |When I log in as "traverst1"Then I should see "Thomas Travers"Scenario: Log out using the log out stepGiven the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |And I am logged in as traverst1When I log outThen I should not see "Thomas Travers"And I should see "You are not logged in"@javascriptScenario: Log out using the log out step (javascript)Given the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |And I am logged in as traverst1When I log outThen I should not see "Thomas Travers"And I should see "You are not logged in"Scenario: Log in step should automatically log user out if already logged inGiven the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers || emeryj | Jane | Emery |And I am logged in as traverst1When I log in as "emeryj"Then I should not see "Thomas Travers"And I should see "Jane Emery"@javascriptScenario: Log in step should automatically log user out if already logged in (javascript)Given the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers || emeryj | Jane | Emery |And I am logged in as traverst1When I log in as "emeryj"Then I should not see "Thomas Travers"And I should see "Jane Emery"Scenario: I am on page logged in as should redirect to correct pageGiven the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |And the following "course" exists:| fullname | Life, the Universe, and Everything || shortname | hhgttg |When I am on the hhgttg Course page logged in as traverst1Then I should see "Thomas Travers"And I should see "Life, the Universe, and Everything"@javascriptScenario: I am on page logged in as should redirect to correct page (javascript)Given the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers |And the following "course" exists:| fullname | Life, the Universe, and Everything || shortname | hhgttg |When I am on the hhgttg Course page logged in as traverst1Then I should see "Thomas Travers"And I should see "Life, the Universe, and Everything"Scenario: I am on page logged in as should redirect to correct page when automatically logging a user outGiven the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers || emeryj | Jane | Emery |And the following "course" exists:| fullname | Life, the Universe, and Everything || shortname | hhgttg |And I am logged in as emeryjWhen I am on the hhgttg Course page logged in as traverst1Then I should see "Thomas Travers"And I should see "Life, the Universe, and Everything"@javascriptScenario: I am on page logged in as should redirect to correct page when automatically logging a user out (javacript)Given the following "users" exist:| username | firstname | lastname || traverst1 | Thomas | Travers || emeryj | Jane | Emery |And the following "course" exists:| fullname | Life, the Universe, and Everything || shortname | hhgttg |And I am logged in as emeryjWhen I am on the hhgttg Course page logged in as traverst1Then I should see "Thomas Travers"And I should see "Life, the Universe, and Everything"