diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-12 10:56:10 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-12 10:56:10 +0400 |
commit | 67b82e90cf00b2ba6063e8203b4f449d890cf98d (patch) | |
tree | aee7114093920cc2c7336ba5cab959d57c68a6a9 /features | |
parent | ef2c8593b9f80951e97fadb5a3c9c5cdf0f1b1c9 (diff) |
Fix random failing test
Diffstat (limited to 'features')
-rw-r--r-- | features/project/team_management.feature | 1 | ||||
-rw-r--r-- | features/steps/project/project_team_management.rb | 18 |
2 files changed, 9 insertions, 10 deletions
diff --git a/features/project/team_management.feature b/features/project/team_management.feature index 04545a08e0a..fc353424e36 100644 --- a/features/project/team_management.feature +++ b/features/project/team_management.feature @@ -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 diff --git a/features/steps/project/project_team_management.rb b/features/steps/project/project_team_management.rb index 96bf0df2899..ffd2aa24676 100644 --- a/features/steps/project/project_team_management.rb +++ b/features/steps/project/project_team_management.rb @@ -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 |