Blame view

features/manage_users.feature 1.7 KB
d0cd6046   alcampelo   Addded cucumber test
1
2
3
4
5
6
7
8
9
10
Feature: manage users
  As an environment administrator
  I want to manage users
  In order to remove, activate, deactivate users, and set admin roles.

Background:
  Given the following users
    | login       | name         |
    | joaosilva   | Joao Silva   |
    | paulosantos | Paulo Santos |
71949171   Rodrigo Souto   manage-users-feat...
11
12
  And I am logged in as admin
  And I go to /admin/users
d0cd6046   alcampelo   Addded cucumber test
13
14
15

  @selenium
  Scenario: deactive user
71949171   Rodrigo Souto   manage-users-feat...
16
17
    Given I follow "Deactivate user" within "tr[title='Joao Silva']"
    When I confirm the browser dialog
4c6bcb89   Fabio Teixeira   Fix rails 4 organ...
18
    Then the field "tr[title='Joao Silva'] td.actions a.icon-activate-user" should be enabled
d0cd6046   alcampelo   Addded cucumber test
19
20
21
22

  @selenium
  Scenario: activate user
    Given I follow "Deactivate user" within "tr[title='Paulo Santos']"
71949171   Rodrigo Souto   manage-users-feat...
23
24
25
    And I confirm the browser dialog
    And I follow "Activate user" within "tr[title='Paulo Santos']"
    When I confirm the browser dialog
4c6bcb89   Fabio Teixeira   Fix rails 4 organ...
26
    Then the field "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" should be enabled
d0cd6046   alcampelo   Addded cucumber test
27
28

  @selenium
f835862a   Daniela Feitosa   Avoid crash when ...
29
  Scenario: remove user
71949171   Rodrigo Souto   manage-users-feat...
30
31
    Given I follow "Remove" within "tr[title='Joao Silva']"
    And I confirm the browser dialog
d0cd6046   alcampelo   Addded cucumber test
32
33
34
35
36
    And I go to /admin/users
    Then I should not see "Joao Silva"

  @selenium
  Scenario: admin user
71949171   Rodrigo Souto   manage-users-feat...
37
38
    Given I follow "Set admin role" within "tr[title='Joao Silva']"
    When I confirm the browser dialog
4c6bcb89   Fabio Teixeira   Fix rails 4 organ...
39
    Then the field "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" should be enabled
d0cd6046   alcampelo   Addded cucumber test
40
41
42
43

  @selenium
  Scenario: unadmin user
    Given I follow "Set admin role" within "tr[title='Paulo Santos']"
71949171   Rodrigo Souto   manage-users-feat...
44
45
46
    And I confirm the browser dialog
    And I follow "Reset admin role" within "tr[title='Paulo Santos']"
    When I confirm the browser dialog
4c6bcb89   Fabio Teixeira   Fix rails 4 organ...
47
    Then the field "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" should be enabled