Commit 655b836b2ac26e7afabeb7faaabb56cf106348d7

Authored by Andrey Kumanyaev
1 parent c8bf5905

test reanimated

features/group/group.feature
@@ -20,7 +20,6 @@ Feature: Groups @@ -20,7 +20,6 @@ Feature: Groups
20 20
21 Scenario: I should add user to projects in Group 21 Scenario: I should add user to projects in Group
22 Given I have new user "John" 22 Given I have new user "John"
23 - When I visit group page  
24 When I visit group people page 23 When I visit group people page
25 - When I select user "John" from list with role "Reporter" 24 + And I select user "John" from list with role "Reporter"
26 Then I should see user "John" in team list 25 Then I should see user "John" in team list
features/steps/group/group.rb
@@ -9,7 +9,7 @@ class Groups < Spinach::FeatureSteps @@ -9,7 +9,7 @@ class Groups < Spinach::FeatureSteps
9 end 9 end
10 10
11 And 'I have group with projects' do 11 And 'I have group with projects' do
12 - @group = create(:group) 12 + @group = create(:group, owner: current_user)
13 @project = create(:project, group: @group) 13 @project = create(:project, group: @group)
14 @event = create(:closed_issue_event, project: @project) 14 @event = create(:closed_issue_event, project: @project)
15 15
@@ -36,7 +36,7 @@ class Groups < Spinach::FeatureSteps @@ -36,7 +36,7 @@ class Groups < Spinach::FeatureSteps
36 create(:user, name: "John") 36 create(:user, name: "John")
37 end 37 end
38 38
39 - When 'I select user "John" from list with role "Reporter"' do 39 + And 'I select user "John" from list with role "Reporter"' do
40 user = User.find_by_name("John") 40 user = User.find_by_name("John")
41 within "#new_team_member" do 41 within "#new_team_member" do
42 select user.name, :from => "user_ids" 42 select user.name, :from => "user_ids"
@@ -46,8 +46,7 @@ class Groups < Spinach::FeatureSteps @@ -46,8 +46,7 @@ class Groups < Spinach::FeatureSteps
46 end 46 end
47 47
48 Then 'I should see user "John" in team list' do 48 Then 'I should see user "John" in team list' do
49 - user = User.find_by_name("John")  
50 - projects_with_access = find(".ui-box .well-list li") 49 + projects_with_access = find(".ui-box .well-list")
51 projects_with_access.should have_content("John") 50 projects_with_access.should have_content("John")
52 end 51 end
53 52