Commit 20a4742efdc9ed96da4ba3cbf6f513aff75c7ab1

Authored by Dmitriy Zaporozhets
1 parent 00e4a479

Fixing team tests

app/assets/stylesheets/sections/projects.scss
... ... @@ -6,8 +6,6 @@
6 6 .side {
7 7 @extend .right;
8 8  
9   - .groups_box,
10   - .teams_box,
11 9 .projects_box {
12 10 > .title {
13 11 padding: 2px 15px;
... ...
app/views/dashboard/_teams.html.haml
1   -.ui-box
  1 +.ui-box.teams-box
2 2 %h5.title
3 3 Teams
4 4 %small
... ...
features/dashboard/dashboard.feature
... ... @@ -16,12 +16,6 @@ Feature: Dashboard
16 16 And I visit dashboard page
17 17 Then I should see groups list
18 18  
19   - Scenario: I should see correct projects count
20   - Given I have group with projects
21   - And group has a projects that does not belongs to me
22   - When I visit dashboard page
23   - Then I should see 1 project at group list
24   -
25 19 Scenario: I should see last push widget
26 20 Then I should see last push widget
27 21 And I click "Create Merge Request" link
... ...
features/steps/userteams/userteams.rb
... ... @@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps
8 8 end
9 9  
10 10 Then 'I should see dashboard page without teams info block' do
11   - page.has_no_css?(".teams_box").must_equal true
  11 + page.has_no_css?(".teams-box").must_equal true
12 12 end
13 13  
14 14 When 'I have teams with my membership' do
15   - team = create :user_team
  15 + team = create :user_team, owner: current_user
16 16 team.add_member(current_user, UserTeam.access_roles["Master"], true)
17 17 end
18 18  
19 19 Then 'I should see dashboard page with teams information block' do
20   - page.should have_css(".teams_box")
  20 + page.should have_css(".teams-box")
21 21 end
22 22  
23 23 When 'exist user teams' do
... ... @@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps
53 53 end
54 54  
55 55 When 'I have teams with projects and members' do
56   - team = create :user_team
  56 + team = create :user_team, owner: current_user
57 57 @project = create :project
58 58 team.add_member(current_user, UserTeam.access_roles["Master"], true)
59 59 team.assign_to_project(@project, UserTeam.access_roles["Master"])
... ... @@ -92,7 +92,7 @@ class Userteams < Spinach::FeatureSteps
92 92 end
93 93  
94 94 Given 'I have team with projects and members' do
95   - team = create :user_team
  95 + team = create :user_team, owner: current_user
96 96 project = create :project
97 97 user = create :user
98 98 team.add_member(current_user, UserTeam.access_roles["Master"], true)
... ... @@ -190,11 +190,11 @@ class Userteams < Spinach::FeatureSteps
190 190 end
191 191  
192 192 And 'I have my own project without teams' do
193   - @project = create :project, creator: current_user
  193 + @project = create :project, namespace: current_user.namespace
194 194 end
195 195  
196 196 And 'I visit my team page' do
197   - team = UserTeam.last
  197 + team = UserTeam.where(owner_id: current_user.id).last
198 198 visit team_path(team)
199 199 end
200 200  
... ... @@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps
213 213  
214 214 When 'I submit form with selected project and max access' do
215 215 within "#assign_projects" do
216   - select @project.name, :from => "project_ids"
  216 + select @project.name_with_namespace, :from => "project_ids"
217 217 select "Reporter", :from => "greatest_project_access"
218 218 end
219 219 click_button "Add"
... ...
features/teams/team.feature
... ... @@ -14,13 +14,6 @@ Feature: UserTeams
14 14 And I visit dashboard page
15 15 Then I should see dashboard page with teams information block
16 16  
17   - Scenario: I should see all teams list
18   - When exist user teams
19   - And I visit dashboard page
20   - And I click on "All teams" link
21   - Then I should see "All teams" page
22   - And I should see exist teams in teams list
23   -
24 17 Scenario: I should can create new team
25 18 When I have teams with my membership
26 19 And I visit dashboard page
... ...