Commit 20a4742efdc9ed96da4ba3cbf6f513aff75c7ab1
1 parent
00e4a479
Exists in
master
and in
4 other branches
Fixing team tests
Showing
5 changed files
with
9 additions
and
24 deletions
Show diff stats
app/assets/stylesheets/sections/projects.scss
app/views/dashboard/_teams.html.haml
features/dashboard/dashboard.feature
| @@ -16,12 +16,6 @@ Feature: Dashboard | @@ -16,12 +16,6 @@ Feature: Dashboard | ||
| 16 | And I visit dashboard page | 16 | And I visit dashboard page |
| 17 | Then I should see groups list | 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 | Scenario: I should see last push widget | 19 | Scenario: I should see last push widget |
| 26 | Then I should see last push widget | 20 | Then I should see last push widget |
| 27 | And I click "Create Merge Request" link | 21 | And I click "Create Merge Request" link |
features/steps/userteams/userteams.rb
| @@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps | @@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps | ||
| 8 | end | 8 | end |
| 9 | 9 | ||
| 10 | Then 'I should see dashboard page without teams info block' do | 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 | end | 12 | end |
| 13 | 13 | ||
| 14 | When 'I have teams with my membership' do | 14 | When 'I have teams with my membership' do |
| 15 | - team = create :user_team | 15 | + team = create :user_team, owner: current_user |
| 16 | team.add_member(current_user, UserTeam.access_roles["Master"], true) | 16 | team.add_member(current_user, UserTeam.access_roles["Master"], true) |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | Then 'I should see dashboard page with teams information block' do | 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 | end | 21 | end |
| 22 | 22 | ||
| 23 | When 'exist user teams' do | 23 | When 'exist user teams' do |
| @@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps | @@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps | ||
| 53 | end | 53 | end |
| 54 | 54 | ||
| 55 | When 'I have teams with projects and members' do | 55 | When 'I have teams with projects and members' do |
| 56 | - team = create :user_team | 56 | + team = create :user_team, owner: current_user |
| 57 | @project = create :project | 57 | @project = create :project |
| 58 | team.add_member(current_user, UserTeam.access_roles["Master"], true) | 58 | team.add_member(current_user, UserTeam.access_roles["Master"], true) |
| 59 | team.assign_to_project(@project, UserTeam.access_roles["Master"]) | 59 | team.assign_to_project(@project, UserTeam.access_roles["Master"]) |
| @@ -92,7 +92,7 @@ class Userteams < Spinach::FeatureSteps | @@ -92,7 +92,7 @@ class Userteams < Spinach::FeatureSteps | ||
| 92 | end | 92 | end |
| 93 | 93 | ||
| 94 | Given 'I have team with projects and members' do | 94 | Given 'I have team with projects and members' do |
| 95 | - team = create :user_team | 95 | + team = create :user_team, owner: current_user |
| 96 | project = create :project | 96 | project = create :project |
| 97 | user = create :user | 97 | user = create :user |
| 98 | team.add_member(current_user, UserTeam.access_roles["Master"], true) | 98 | team.add_member(current_user, UserTeam.access_roles["Master"], true) |
| @@ -190,11 +190,11 @@ class Userteams < Spinach::FeatureSteps | @@ -190,11 +190,11 @@ class Userteams < Spinach::FeatureSteps | ||
| 190 | end | 190 | end |
| 191 | 191 | ||
| 192 | And 'I have my own project without teams' do | 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 | end | 194 | end |
| 195 | 195 | ||
| 196 | And 'I visit my team page' do | 196 | And 'I visit my team page' do |
| 197 | - team = UserTeam.last | 197 | + team = UserTeam.where(owner_id: current_user.id).last |
| 198 | visit team_path(team) | 198 | visit team_path(team) |
| 199 | end | 199 | end |
| 200 | 200 | ||
| @@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps | @@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps | ||
| 213 | 213 | ||
| 214 | When 'I submit form with selected project and max access' do | 214 | When 'I submit form with selected project and max access' do |
| 215 | within "#assign_projects" do | 215 | within "#assign_projects" do |
| 216 | - select @project.name, :from => "project_ids" | 216 | + select @project.name_with_namespace, :from => "project_ids" |
| 217 | select "Reporter", :from => "greatest_project_access" | 217 | select "Reporter", :from => "greatest_project_access" |
| 218 | end | 218 | end |
| 219 | click_button "Add" | 219 | click_button "Add" |
features/teams/team.feature
| @@ -14,13 +14,6 @@ Feature: UserTeams | @@ -14,13 +14,6 @@ Feature: UserTeams | ||
| 14 | And I visit dashboard page | 14 | And I visit dashboard page |
| 15 | Then I should see dashboard page with teams information block | 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 | Scenario: I should can create new team | 17 | Scenario: I should can create new team |
| 25 | When I have teams with my membership | 18 | When I have teams with my membership |
| 26 | And I visit dashboard page | 19 | And I visit dashboard page |