Skip to content

Commit 20a4742

Browse files
committed
Fixing team tests
1 parent 00e4a47 commit 20a4742

File tree

5 files changed

+9
-24
lines changed

5 files changed

+9
-24
lines changed

app/assets/stylesheets/sections/projects.scss

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
.side {
77
@extend .right;
88

9-
.groups_box,
10-
.teams_box,
119
.projects_box {
1210
> .title {
1311
padding: 2px 15px;

app/views/dashboard/_teams.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.ui-box
1+
.ui-box.teams-box
22
%h5.title
33
Teams
44
%small

features/dashboard/dashboard.feature

-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ Feature: Dashboard
1616
And I visit dashboard page
1717
Then I should see groups list
1818

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-
2519
Scenario: I should see last push widget
2620
Then I should see last push widget
2721
And I click "Create Merge Request" link

features/steps/userteams/userteams.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps
88
end
99

1010
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
1212
end
1313

1414
When 'I have teams with my membership' do
15-
team = create :user_team
15+
team = create :user_team, owner: current_user
1616
team.add_member(current_user, UserTeam.access_roles["Master"], true)
1717
end
1818

1919
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")
2121
end
2222

2323
When 'exist user teams' do
@@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps
5353
end
5454

5555
When 'I have teams with projects and members' do
56-
team = create :user_team
56+
team = create :user_team, owner: current_user
5757
@project = create :project
5858
team.add_member(current_user, UserTeam.access_roles["Master"], true)
5959
team.assign_to_project(@project, UserTeam.access_roles["Master"])
@@ -92,7 +92,7 @@ class Userteams < Spinach::FeatureSteps
9292
end
9393

9494
Given 'I have team with projects and members' do
95-
team = create :user_team
95+
team = create :user_team, owner: current_user
9696
project = create :project
9797
user = create :user
9898
team.add_member(current_user, UserTeam.access_roles["Master"], true)
@@ -190,11 +190,11 @@ class Userteams < Spinach::FeatureSteps
190190
end
191191

192192
And 'I have my own project without teams' do
193-
@project = create :project, creator: current_user
193+
@project = create :project, namespace: current_user.namespace
194194
end
195195

196196
And 'I visit my team page' do
197-
team = UserTeam.last
197+
team = UserTeam.where(owner_id: current_user.id).last
198198
visit team_path(team)
199199
end
200200

@@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps
213213

214214
When 'I submit form with selected project and max access' do
215215
within "#assign_projects" do
216-
select @project.name, :from => "project_ids"
216+
select @project.name_with_namespace, :from => "project_ids"
217217
select "Reporter", :from => "greatest_project_access"
218218
end
219219
click_button "Add"

features/teams/team.feature

-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ Feature: UserTeams
1414
And I visit dashboard page
1515
Then I should see dashboard page with teams information block
1616

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-
2417
Scenario: I should can create new team
2518
When I have teams with my membership
2619
And I visit dashboard page

0 commit comments

Comments
 (0)