diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 65b829a76c..6a5c5f8451 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -19,7 +19,7 @@ class RolesController < ApplicationController def index @roles = Role.order('builtin, position') - .page(params[:page]) + .page(page_param) .per_page(per_page_param) render :action => "index", :layout => false if request.xhr? diff --git a/config/locales/de.yml b/config/locales/de.yml index 0c2394cd25..5f2f4e14cd 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -230,7 +230,9 @@ de: news: "News" project: "Projekt" query: "Benutzerdefinierte Abfrage" - role: "Rolle" + role: + one : "Rolle" + other: "Rollen" tracker: "Tracker" planning_element: Planungselement planning_element_type: Planungselement-Typ diff --git a/config/locales/en.yml b/config/locales/en.yml index 345f61be9d..8fad5fded5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -234,7 +234,9 @@ en: news: "News" project: "Project" query: "Custom query" - role: "Role" + role: + one : "Role" + other: "Roles" tracker: "Tracker" planning_element: Planning element planning_element_type: Planning element type diff --git a/features/roles/role_crud.feature b/features/roles/role_crud.feature new file mode 100644 index 0000000000..922b1b5bb3 --- /dev/null +++ b/features/roles/role_crud.feature @@ -0,0 +1,22 @@ +Feature: As an admin + I want to administrate roles with permissions + So that I can modify permissions of roles + + @javascript + Scenario: Normal Role creation with existing role with same name + And I am already logged in as "admin" + When I go to the new page of "Role" + Then I should see "Issues can be assigned to this role" + When I fill in "Name" with "Manager" + And I click on "Create" + Then I should see "Successful creation." + + @javascript + Scenario: Normal Role creation with existing role with same name + And there is a role "Manager" + And I am already logged in as "admin" + When I go to the new page of "Role" + Then I should see "Issues can be assigned to this role" + When I fill in "Name" with "Manager" + And I click on "Create" + Then I should see "Name has already been taken" diff --git a/features/step_definitions/project_member_steps.rb b/features/step_definitions/project_member_steps.rb index 93e1fd28b8..455aad6d9c 100644 --- a/features/step_definitions/project_member_steps.rb +++ b/features/step_definitions/project_member_steps.rb @@ -43,12 +43,6 @@ When /^I follow the delete link of the project member "(.+?)"$/ do |login_name| steps %Q{When I follow "Delete" within "#member-#{member.id}"} end -When /^I go to the project member settings of the project(?: called) "(.+?)"$/ do |project_name| - steps %Q{ - When I go to the settings page of the project called "#{project_name}" - And I click on "tab-members" - } -end When /^I add( the)? principal "(.+)" as( a)? "(.+)"$/ do |_, principal, _, role| found_principal = Principal.like(principal).first