Commit 67b82e90 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix random failing test

parent ef2c8593
- team.each do |access, members| - team.each do |access, members|
.ui-box - role = Project.access_options.key(access).pluralize
.ui-box{class: role.downcase}
%h5.title %h5.title
= Project.access_options.key(access).pluralize = role
%small= members.size %span.light (#{members.size})
%ul.well-list %ul.well-list
- members.sort_by(&:user_name).each do |team_member| - members.sort_by(&:user_name).each do |team_member|
= render 'team_members/team_member', member: team_member = render 'team_members/team_member', member: team_member
...@@ -21,7 +21,6 @@ Feature: Project Team management ...@@ -21,7 +21,6 @@ Feature: Project Team management
Scenario: Update user access Scenario: Update user access
Given I should see "Sam" in team list as "Developer" Given I should see "Sam" in team list as "Developer"
And I change "Sam" role to "Reporter" And I change "Sam" role to "Reporter"
Then I visit project "Shop" team page
And I should see "Sam" in team list as "Reporter" And I should see "Sam" in team list as "Reporter"
Scenario: Cancel team member Scenario: Cancel team member
......
...@@ -30,15 +30,15 @@ class ProjectTeamManagement < Spinach::FeatureSteps ...@@ -30,15 +30,15 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end end
Then 'I should see "Mike" in team list as "Reporter"' do Then 'I should see "Mike" in team list as "Reporter"' do
user = User.find_by_name("Mike") within '.reporters' do
role_id = find(".user_#{user.id} #team_member_project_access").value page.should have_content('Mike')
role_id.should == UsersProject.access_roles["Reporter"].to_s end
end end
Given 'I should see "Sam" in team list as "Developer"' do Given 'I should see "Sam" in team list as "Developer"' do
user = User.find_by_name("Sam") within '.developers' do
role_id = find(".user_#{user.id} #team_member_project_access").value page.should have_content('Sam')
role_id.should == UsersProject.access_roles["Developer"].to_s end
end end
And 'I change "Sam" role to "Reporter"' do And 'I change "Sam" role to "Reporter"' do
...@@ -49,9 +49,9 @@ class ProjectTeamManagement < Spinach::FeatureSteps ...@@ -49,9 +49,9 @@ class ProjectTeamManagement < Spinach::FeatureSteps
end end
And 'I should see "Sam" in team list as "Reporter"' do And 'I should see "Sam" in team list as "Reporter"' do
user = User.find_by_name("Sam") within '.reporters' do
role_id = find(".user_#{user.id} #team_member_project_access").value page.should have_content('Sam')
role_id.should == UsersProject.access_roles["Reporter"].to_s end
end end
And 'I click link "Remove from team"' do And 'I click link "Remove from team"' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment