diff --git a/app/views/profile_members/change_role.rhtml b/app/views/profile_members/change_role.rhtml index 04c71ec..8efe363 100644 --- a/app/views/profile_members/change_role.rhtml +++ b/app/views/profile_members/change_role.rhtml @@ -7,7 +7,7 @@ <%= labelled_check_box(r.name, 'roles[]', r.id, @associations.map(&:role).include?(r) ) %>
<% end %> diff --git a/app/views/role/index.rhtml b/app/views/role/index.rhtml index 6df2180..ee77070 100644 --- a/app/views/role/index.rhtml +++ b/app/views/role/index.rhtml @@ -18,6 +18,6 @@ <% button_bar do %> - <%= button :back, _('Back'), :controller => 'admin_panel' %> - <%= button :add, _('New'), :action => 'new' %> + <%= button :add, _('Create a new role'), :action => 'new' %> + <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> <% end %> diff --git a/app/views/role/show.rhtml b/app/views/role/show.rhtml index 5db3517..97da59e 100644 --- a/app/views/role/show.rhtml +++ b/app/views/role/show.rhtml @@ -7,4 +7,7 @@ <% end %> -<%= link_to _('Back'), :action => 'index' %> +<% button_bar do %> + <%= button :edit, _('Edit'), :action => 'edit', :id => @role %> + <%= button :back, _('Back to roles management'), :action => 'index' %> +<% end %> diff --git a/features/roles.feature b/features/roles.feature new file mode 100644 index 0000000..948da17 --- /dev/null +++ b/features/roles.feature @@ -0,0 +1,30 @@ +Feature: manage roles + As an environment admin + I want to create and edit roles + + Scenario: create new role + Given I am logged in as admin + And I go to the environment control panel + And I follow "Manage User roles" + Then I should not see "My new role" + And I follow "Create a new role" + And I fill in "Name" with "My new role" + And I check "Publish content" + And I press "Create role" + And I go to the environment control panel + And I follow "Manage User roles" + Then I should see "My new role" + + Scenario: edit a role + Given I am logged in as admin + And I go to the environment control panel + And I follow "Manage User roles" + Then I should not see "My new role" + And I follow "Profile Administrator" + And I follow "Edit" + And I fill in "Name" with "My new role" + And I press "Save changes" + And I go to the environment control panel + And I follow "Manage User roles" + Then I should see "My new role" + And I should not see "Profile Administrator" -- libgit2 0.21.2