2 Feature: Edit a users password
3 In order edit a user password properly
5 I need to be able to edit their profile and change their password
8 Scenario: Verify the password field is enabled/disabled based on authentication selected, in user edit advanced page.
9 Given I log in as "admin"
10 When I navigate to "Users > Accounts > Add a new user" in site administration
11 Then the "New password" "field" should be enabled
12 And I set the field "auth" to "Web services authentication"
13 And the "New password" "field" should be disabled
14 And I set the field "auth" to "Email-based self-registration"
15 And the "New password" "field" should be enabled
16 # We need to cancel/submit a form that has been modified.
17 And I press "Create user"
19 Scenario: Log out web apps field is not present if user doesn't have active token
20 Given the following "users" exist:
21 | username | firstname | lastname | email |
22 | user01 | User | One | user01@example.com |
23 When I am on the "user01" "user > editing" page logged in as "admin"
24 Then "Log out of all web apps" "field" should not exist
26 Scenario Outline: Log out web apps field is present based on expiry of active token
27 Given the following "users" exist:
28 | username | firstname | lastname | email |
29 | user01 | User | One | user01@example.com |
30 And the following "core_webservice > Service" exist:
32 | mytestservice | My test service |
33 And the following "core_webservice > Tokens" exist:
34 | user | service | validuntil |
35 | user01 | mytestservice | <validuntil> |
36 When I am on the "user01" "user > editing" page logged in as "admin"
37 Then "Log out of all web apps" "field" <shouldornot> exist
39 | validuntil | shouldornot |
40 | ## -1 month ## | should not |
42 | ## +1 month ## | should |