/
preferences.feature
41 lines (36 loc) · 1.61 KB
/
preferences.feature
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
Feature: Manage preferences
In order to customize Tracks to my needs
As a Tracks user
I want to be be able change my preferences
Background:
Given the following user record
| login | password | is_admin |
| testuser | secret | false |
And I have logged in as "testuser" with password "secret"
Scenario: I can change my password
When I go to the preferences page
And I set the password and confirmation to "secret123"
When I log out of Tracks
And I go to the login page
And I submit the login form as user "testuser" with password "secret"
Then I should see "Login unsuccessful"
When I submit the login form as user "testuser" with password "secret123"
Then I should see "Login successful"
Scenario: I can leave password field empty and the password will not be changed
When I go to the preferences page
And I set the password and confirmation to ""
When I log out of Tracks
And I go to the login page
And I submit the login form as user "testuser" with password ""
Then I should see "Login unsuccessful"
When I submit the login form as user "testuser" with password "secret"
Then I should see "Login successful"
Scenario: The password and the confirmation need to be the same
When I go to the preferences page
And I set the password to "secret" and confirmation to "wrong"
Then I should see "Password doesn't match confirmation"
Scenario: I can edit preferences
When I go to the preferences page
Then I should see "Logout (testuser)"
When I edit my last name to "Tester"
Then I should see "Logout (Tester)"