ref: master
features/last_administrator_leaving.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 42 43 44 45 46 47 48 |
Feature: remove administrator role As an organization administrator I want to remove my administrator role In order to stop administrating the organization Background: Given the following users | login | name | | joaosilva | Joao Silva | | mariasouza | Maria Souza | And the following community | name | identifier | | Nice people | nice-people | And "Joao Silva" is admin of "Nice people" And I am logged in as "joaosilva" Scenario: the last administrator removes his administrator role and must choose the new administrator Given "Maria Souza" is a member of "Nice people" And I am on Nice people's members management And I follow "Edit" within "tr[title='Joao Silva']" And I uncheck "Profile Administrator" When I press "Save changes" Then I should see "Since you are the last administrator, you must choose" Scenario: the last administrator and member removes his administrator role and the next member to join becomes the new administrator Given I am on Nice people's members management And I follow "Edit" And I uncheck "Profile Administrator" And I uncheck "Profile Member" When I press "Save changes" Then I should see "Since you are the last administrator, you must choose at least one member to administer this community." And I press "Save" And I am logged in as "mariasouza" When I go to Nice people's join page Then "Maria Souza" should be admin of "Nice people" Scenario: the last administrator and member removes his administrator role and the next member to join becomes the new administrator even if the organization is closed. Given the community "Nice people" is closed And I am on Nice people's members management And I follow "Edit" And I uncheck "Profile Administrator" And I uncheck "Profile Member" When I press "Save changes" Then I should see "Since you are the last administrator, you must choose at least one member to administer this community." And I press "Save" And I am logged in as "mariasouza" When I go to Nice people's join page Then "Maria Souza" should be admin of "Nice people" |