forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-45266-master' of git://github.com/danpoltawski/moodle
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@block @block_login | ||
Feature: Login from a block | ||
In order to make it easier to login | ||
As an user | ||
In need to login through a block | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | password | firstname | lastname | email | | ||
| testuser | testpass | Test | User | student1@asd.com | | ||
And I log in as "admin" | ||
And I navigate to "Turn editing on" node in "Front page settings" | ||
And I add the "Login" block | ||
|
||
Scenario: Login block visible to non-logged in users | ||
Given I log out | ||
When I am on homepage | ||
Then "Login" "block" should exist | ||
|
||
Scenario: Login as student through login block | ||
Given I log out | ||
And I am on homepage | ||
When I set the field "Username" to "testuser" | ||
And I set the field "Password" to "testpass" | ||
And I click on "Log in" "button" in the "Login" "block" | ||
Then I should see "You are logged in as Test User" | ||
And "Login" "block" should not exist |