Fix spinach features

And several other failures
This commit is contained in:
Bob Van Landuyt 2017-10-11 11:22:49 +02:00
parent 2c6c2ed6fa
commit bd8943f5ad
6 changed files with 13 additions and 5 deletions

View File

@ -7,7 +7,7 @@ module GroupTree
# Only show root groups if no parent-id is given # Only show root groups if no parent-id is given
groups.where(parent_id: params[:parent_id]) groups.where(parent_id: params[:parent_id])
end end
@groups = @groups.with_selects_for_list @groups = @groups.with_selects_for_list(params[:archived])
.sort(@sort = params[:sort]) .sort(@sort = params[:sort])
.page(params[:page]) .page(params[:page])

View File

@ -6,7 +6,6 @@
- else - else
- default_sort_by = sort_value_recently_created - default_sort_by = sort_value_recently_created
.dropdown.inline.js-group-filter-dropdown-wrap.append-right-10 .dropdown.inline.js-group-filter-dropdown-wrap.append-right-10
%button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' } %button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
%span.dropdown-label %span.dropdown-label

View File

@ -3,6 +3,7 @@ Feature: Explore Groups
Background: Background:
Given group "TestGroup" has private project "Enterprise" Given group "TestGroup" has private project "Enterprise"
@javascript
Scenario: I should see group with private and internal projects as user Scenario: I should see group with private and internal projects as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
When I sign in as a user When I sign in as a user
@ -10,6 +11,7 @@ Feature: Explore Groups
Then I should see project "Internal" items Then I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group issues for internal project as user Scenario: I should see group issues for internal project as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
When I sign in as a user When I sign in as a user
@ -17,6 +19,7 @@ Feature: Explore Groups
Then I should see project "Internal" items Then I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group merge requests for internal project as user Scenario: I should see group merge requests for internal project as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
When I sign in as a user When I sign in as a user
@ -24,6 +27,7 @@ Feature: Explore Groups
Then I should see project "Internal" items Then I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group with private, internal and public projects as visitor Scenario: I should see group with private, internal and public projects as visitor
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -32,6 +36,7 @@ Feature: Explore Groups
And I should not see project "Internal" items And I should not see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group issues for public project as visitor Scenario: I should see group issues for public project as visitor
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -40,6 +45,7 @@ Feature: Explore Groups
And I should not see project "Internal" items And I should not see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group merge requests for public project as visitor Scenario: I should see group merge requests for public project as visitor
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -48,6 +54,7 @@ Feature: Explore Groups
And I should not see project "Internal" items And I should not see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group with private, internal and public projects as user Scenario: I should see group with private, internal and public projects as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -57,6 +64,7 @@ Feature: Explore Groups
And I should see project "Internal" items And I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group issues for internal and public projects as user Scenario: I should see group issues for internal and public projects as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -66,6 +74,7 @@ Feature: Explore Groups
And I should see project "Internal" items And I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group merge requests for internal and public projects as user Scenario: I should see group merge requests for internal and public projects as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
@ -75,17 +84,20 @@ Feature: Explore Groups
And I should see project "Internal" items And I should see project "Internal" items
And I should not see project "Enterprise" items And I should not see project "Enterprise" items
@javascript
Scenario: I should see group with public project in public groups area Scenario: I should see group with public project in public groups area
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
When I visit the public groups area When I visit the public groups area
Then I should see group "TestGroup" Then I should see group "TestGroup"
@javascript
Scenario: I should see group with public project in public groups area as user Scenario: I should see group with public project in public groups area as user
Given group "TestGroup" has public project "Community" Given group "TestGroup" has public project "Community"
When I sign in as a user When I sign in as a user
And I visit the public groups area And I visit the public groups area
Then I should see group "TestGroup" Then I should see group "TestGroup"
@javascript
Scenario: I should see group with internal project in public groups area as user Scenario: I should see group with internal project in public groups area as user
Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has internal project "Internal"
When I sign in as a user When I sign in as a user

View File

@ -418,7 +418,6 @@ describe GroupsController do
end end
end end
end end
end end
describe 'GET #issues' do describe 'GET #issues' do

View File

@ -2199,7 +2199,6 @@ describe Project do
it { expect(project.parent_id).to eq(project.namespace_id) } it { expect(project.parent_id).to eq(project.namespace_id) }
end end
describe '#parent_changed?' do describe '#parent_changed?' do
let(:project) { create(:project) } let(:project) { create(:project) }

View File

@ -39,7 +39,6 @@ describe GroupChildSerializer do
subgroup1 = create(:group, parent: parent) subgroup1 = create(:group, parent: parent)
subsub_group1 = create(:group, parent: subgroup1) subsub_group1 = create(:group, parent: subgroup1)
subgroup2 = create(:group, parent: parent) subgroup2 = create(:group, parent: parent)
subsub_group2 = create(:group, parent: subgroup2)
json = serializer.represent([subgroup1, subsub_group1, subgroup1, subgroup2]) json = serializer.represent([subgroup1, subsub_group1, subgroup1, subgroup2])
subgroup1_json = json.first subgroup1_json = json.first