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

Fix random failing test

parent ef2c8593
- 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
......
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