Commit 496b7da7a0cb85dd87fd4360691cc2d7cb50f484
1 parent
1587caa3
Exists in
master
and in
4 other branches
Fix spinach tests
Showing
3 changed files
with
5 additions
and
5 deletions
Show diff stats
app/views/admin/teams/members/new.html.haml
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | %td= @team.admin?(member) ? "Admin" : "Member" |
22 | 22 | %td |
23 | 23 | %tr |
24 | - %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_email), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' | |
24 | + %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' | |
25 | 25 | %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" } |
26 | 26 | %td |
27 | 27 | %span= check_box_tag :group_admin | ... | ... |
features/steps/admin/admin_teams.rb
... | ... | @@ -46,13 +46,13 @@ class AdminTeams < Spinach::FeatureSteps |
46 | 46 | Then 'I should see only me in members table' do |
47 | 47 | members_list = find("#members_list .member") |
48 | 48 | members_list.should have_content(current_user.name) |
49 | - members_list.should have_content(current_user.email) | |
49 | + members_list.should have_content(current_user.username) | |
50 | 50 | end |
51 | 51 | |
52 | 52 | When 'I select user "John" from user list as "Developer"' do |
53 | 53 | @user ||= User.find_by_name("John") |
54 | 54 | within "#team_members" do |
55 | - select "#{@user.name} (#{@user.email})", from: "user_ids" | |
55 | + select "#{@user.name} (#{@user.username})", from: "user_ids" | |
56 | 56 | select "Developer", from: "default_project_access" |
57 | 57 | end |
58 | 58 | end |
... | ... | @@ -129,7 +129,7 @@ class AdminTeams < Spinach::FeatureSteps |
129 | 129 | When 'I select user "Jimm" ub team members list as "Master"' do |
130 | 130 | user = User.find_by_name("Jimm") |
131 | 131 | within "#team_members" do |
132 | - select "#{user.name} (#{user.email})", from: "user_ids" | |
132 | + select "#{user.name} (#{user.username})", from: "user_ids" | |
133 | 133 | select "Developer", from: "default_project_access" |
134 | 134 | end |
135 | 135 | end | ... | ... |
features/steps/project/project_team_management.rb
... | ... | @@ -21,7 +21,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps |
21 | 21 | And 'I select "Mike" as "Reporter"' do |
22 | 22 | user = User.find_by_name("Mike") |
23 | 23 | within "#new_team_member" do |
24 | - select user.name, :from => "user_ids" | |
24 | + select "#{user.name} (#{user.username})", :from => "user_ids" | |
25 | 25 | select "Reporter", :from => "project_access" |
26 | 26 | end |
27 | 27 | click_button "Add users" | ... | ... |