Commit 20a4742e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fixing team tests

parent 00e4a479
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
.side { .side {
@extend .right; @extend .right;
.groups_box,
.teams_box,
.projects_box { .projects_box {
> .title { > .title {
padding: 2px 15px; padding: 2px 15px;
......
.ui-box .ui-box.teams-box
%h5.title %h5.title
Teams Teams
%small %small
......
...@@ -16,12 +16,6 @@ Feature: Dashboard ...@@ -16,12 +16,6 @@ Feature: Dashboard
And I visit dashboard page And I visit dashboard page
Then I should see groups list Then I should see groups list
Scenario: I should see correct projects count
Given I have group with projects
And group has a projects that does not belongs to me
When I visit dashboard page
Then I should see 1 project at group list
Scenario: I should see last push widget Scenario: I should see last push widget
Then I should see last push widget Then I should see last push widget
And I click "Create Merge Request" link And I click "Create Merge Request" link
......
...@@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps ...@@ -8,16 +8,16 @@ class Userteams < Spinach::FeatureSteps
end end
Then 'I should see dashboard page without teams info block' do Then 'I should see dashboard page without teams info block' do
page.has_no_css?(".teams_box").must_equal true page.has_no_css?(".teams-box").must_equal true
end end
When 'I have teams with my membership' do When 'I have teams with my membership' do
team = create :user_team team = create :user_team, owner: current_user
team.add_member(current_user, UserTeam.access_roles["Master"], true) team.add_member(current_user, UserTeam.access_roles["Master"], true)
end end
Then 'I should see dashboard page with teams information block' do Then 'I should see dashboard page with teams information block' do
page.should have_css(".teams_box") page.should have_css(".teams-box")
end end
When 'exist user teams' do When 'exist user teams' do
...@@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps ...@@ -53,7 +53,7 @@ class Userteams < Spinach::FeatureSteps
end end
When 'I have teams with projects and members' do When 'I have teams with projects and members' do
team = create :user_team team = create :user_team, owner: current_user
@project = create :project @project = create :project
team.add_member(current_user, UserTeam.access_roles["Master"], true) team.add_member(current_user, UserTeam.access_roles["Master"], true)
team.assign_to_project(@project, UserTeam.access_roles["Master"]) 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
end end
Given 'I have team with projects and members' do Given 'I have team with projects and members' do
team = create :user_team team = create :user_team, owner: current_user
project = create :project project = create :project
user = create :user user = create :user
team.add_member(current_user, UserTeam.access_roles["Master"], true) 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
end end
And 'I have my own project without teams' do And 'I have my own project without teams' do
@project = create :project, creator: current_user @project = create :project, namespace: current_user.namespace
end end
And 'I visit my team page' do And 'I visit my team page' do
team = UserTeam.last team = UserTeam.where(owner_id: current_user.id).last
visit team_path(team) visit team_path(team)
end end
...@@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps ...@@ -213,7 +213,7 @@ class Userteams < Spinach::FeatureSteps
When 'I submit form with selected project and max access' do When 'I submit form with selected project and max access' do
within "#assign_projects" do within "#assign_projects" do
select @project.name, :from => "project_ids" select @project.name_with_namespace, :from => "project_ids"
select "Reporter", :from => "greatest_project_access" select "Reporter", :from => "greatest_project_access"
end end
click_button "Add" click_button "Add"
......
...@@ -14,13 +14,6 @@ Feature: UserTeams ...@@ -14,13 +14,6 @@ Feature: UserTeams
And I visit dashboard page And I visit dashboard page
Then I should see dashboard page with teams information block Then I should see dashboard page with teams information block
Scenario: I should see all teams list
When exist user teams
And I visit dashboard page
And I click on "All teams" link
Then I should see "All teams" page
And I should see exist teams in teams list
Scenario: I should can create new team Scenario: I should can create new team
When I have teams with my membership When I have teams with my membership
And I visit dashboard page And I visit dashboard page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment