login.feature
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Feature: login
As a user
I want to login
In order to view pages logged in
Background:
Given the following users
| login | name |
| joaosilva | Joao Silva |
Scenario: login from portal homepage
Given I am not logged in
And I go to the homepage
And I fill in the following:
| Username | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on the homepage
Scenario: login from some profile page
Given I am not logged in
And the following users
| login | name |
| mariasilva | Maria Silva |
And the following articles
| owner | name | homepage |
| mariasilva | my home page | true |
And I go to Maria Silva's homepage
And I follow "Login"
And I fill in the following:
| Username | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on Maria Silva's homepage
Scenario: view my control panel
Given I am not logged in
And I go to Joao Silva's control panel
And I should be on login page
And I fill in the following:
| Username | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on Joao Silva's control panel
Scenario: be redirected if user goes to login page and is logged
Given I am logged in as "joaosilva"
And I go to login page
Then I should be on Joao Silva's control panel