diff --git a/app/views/admin/teams/members/new.html.haml b/app/views/admin/teams/members/new.html.haml index a37c941d..d3929cb7 100644 --- a/app/views/admin/teams/members/new.html.haml +++ b/app/views/admin/teams/members/new.html.haml @@ -21,7 +21,7 @@ %td= @team.admin?(member) ? "Admin" : "Member" %td %tr - %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_email), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' + %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" } %td %span= check_box_tag :group_admin diff --git a/features/steps/admin/admin_teams.rb b/features/steps/admin/admin_teams.rb index 6423f3df..65c7e485 100644 --- a/features/steps/admin/admin_teams.rb +++ b/features/steps/admin/admin_teams.rb @@ -46,13 +46,13 @@ class AdminTeams < Spinach::FeatureSteps Then 'I should see only me in members table' do members_list = find("#members_list .member") members_list.should have_content(current_user.name) - members_list.should have_content(current_user.email) + members_list.should have_content(current_user.username) end When 'I select user "John" from user list as "Developer"' do @user ||= User.find_by_name("John") within "#team_members" do - select "#{@user.name} (#{@user.email})", from: "user_ids" + select "#{@user.name} (#{@user.username})", from: "user_ids" select "Developer", from: "default_project_access" end end @@ -129,7 +129,7 @@ class AdminTeams < Spinach::FeatureSteps When 'I select user "Jimm" ub team members list as "Master"' do user = User.find_by_name("Jimm") within "#team_members" do - select "#{user.name} (#{user.email})", from: "user_ids" + select "#{user.name} (#{user.username})", from: "user_ids" select "Developer", from: "default_project_access" end end diff --git a/features/steps/project/project_team_management.rb b/features/steps/project/project_team_management.rb index fb7666bc..49e9a93f 100644 --- a/features/steps/project/project_team_management.rb +++ b/features/steps/project/project_team_management.rb @@ -21,7 +21,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps And 'I select "Mike" as "Reporter"' do user = User.find_by_name("Mike") within "#new_team_member" do - select user.name, :from => "user_ids" + select "#{user.name} (#{user.username})", :from => "user_ids" select "Reporter", :from => "project_access" end click_button "Add users"