Merge pull request #222 from opf/feature/rails3_fix_roles

[OPF#1053] Feature/rails3 fix roles
pull/229/merge
cratz 11 years ago
commit 54ab963a70
  1. 2
      app/controllers/roles_controller.rb
  2. 4
      config/locales/de.yml
  3. 4
      config/locales/en.yml
  4. 22
      features/roles/role_crud.feature
  5. 6
      features/step_definitions/project_member_steps.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?

@ -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

@ -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

@ -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"

@ -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

Loading…
Cancel
Save