Fix random failing test
This commit is contained in:
parent
ef2c8593b9
commit
67b82e90cf
3 changed files with 13 additions and 13 deletions
|
@ -1,8 +1,9 @@
|
|||
- team.each do |access, members|
|
||||
.ui-box
|
||||
- role = Project.access_options.key(access).pluralize
|
||||
.ui-box{class: role.downcase}
|
||||
%h5.title
|
||||
= Project.access_options.key(access).pluralize
|
||||
%small= members.size
|
||||
= role
|
||||
%span.light (#{members.size})
|
||||
%ul.well-list
|
||||
- members.sort_by(&:user_name).each do |team_member|
|
||||
= render 'team_members/team_member', member: team_member
|
||||
|
|
|
@ -21,7 +21,6 @@ Feature: Project Team management
|
|||
Scenario: Update user access
|
||||
Given I should see "Sam" in team list as "Developer"
|
||||
And I change "Sam" role to "Reporter"
|
||||
Then I visit project "Shop" team page
|
||||
And I should see "Sam" in team list as "Reporter"
|
||||
|
||||
Scenario: Cancel team member
|
||||
|
|
|
@ -30,15 +30,15 @@ class ProjectTeamManagement < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
Then 'I should see "Mike" in team list as "Reporter"' do
|
||||
user = User.find_by_name("Mike")
|
||||
role_id = find(".user_#{user.id} #team_member_project_access").value
|
||||
role_id.should == UsersProject.access_roles["Reporter"].to_s
|
||||
within '.reporters' do
|
||||
page.should have_content('Mike')
|
||||
end
|
||||
end
|
||||
|
||||
Given 'I should see "Sam" in team list as "Developer"' do
|
||||
user = User.find_by_name("Sam")
|
||||
role_id = find(".user_#{user.id} #team_member_project_access").value
|
||||
role_id.should == UsersProject.access_roles["Developer"].to_s
|
||||
within '.developers' do
|
||||
page.should have_content('Sam')
|
||||
end
|
||||
end
|
||||
|
||||
And 'I change "Sam" role to "Reporter"' do
|
||||
|
@ -49,9 +49,9 @@ class ProjectTeamManagement < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
And 'I should see "Sam" in team list as "Reporter"' do
|
||||
user = User.find_by_name("Sam")
|
||||
role_id = find(".user_#{user.id} #team_member_project_access").value
|
||||
role_id.should == UsersProject.access_roles["Reporter"].to_s
|
||||
within '.reporters' do
|
||||
page.should have_content('Sam')
|
||||
end
|
||||
end
|
||||
|
||||
And 'I click link "Remove from team"' do
|
||||
|
|
Loading…
Reference in a new issue