Fix pagination on search result page when ES search is enabled
Merge request reports
Activity
Added 1 commit:
- c79534a8 - Fix pagination on search result page when ES search is enabled
@rymai or maybe you can review?
mentioned in issue #811 (closed)
Reassigned to @rymai
13 And I find a Milestone 14 15 Scenario: I search through the issues and I see pagination 16 Given project has 21 issues available for search 17 And I visit dashboard page 18 Then I search "initial" 19 And I see pagination on the Issue page We're currently moving away from Spinach:
As of March 2016, we are trying to avoid adding new Spinach tests going forward, opting for RSpec feature specs. Adding new Spinach scenarios is acceptable only if the new scenario requires no more than one new
step
definition. If more than that is required, the test should be re-implemented using RSpec instead.– https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/testing.md#spinach-feature-tests
29 29 @merge_request = create :merge_request, title: 'bla-bla initial', source_project: @project 30 30 @milestone = create :milestone, title: 'bla-bla initial', project: @project 31 31 end 32 33 step 'project has 21 issues available for search' do 34 21.times do |i| 35 create :issue, title: "initial #{i}", project: @project 36 end create_list(:issue, 21, project: @Project)
👍 we could maybe avoid creating 21 records, but changing the Kaminari.default_per_page
I don't think it's good idea. Integration tests should not use mock.
@vsizov I had a few suggestions regarding the tests, but the actual fix looks good to me.
Reassigned to @vsizov
Added 1 commit:
- 9ffecaf7 - add spec
Added 3 commits:
-
9ffecaf7...06a166a2 - 2 commits from branch
master
- 347b53f1 - Fix pagination on search result page when ES search is enabled
-
9ffecaf7...06a166a2 - 2 commits from branch
Added 1 commit:
- 4feece80 - Fix pagination on search result page when ES search is enabled
Reassigned to @rymai
@vsizov Thanks, LGTM!
- spec/support/search_helpers.rb 0 → 100644
1 module SearchHelpers @vsizov Do you think it would make sense to backport this to CE?
I think yes. More over, It would be also great to move everything about search to rspec.
https://gitlab.com/gitlab-org/gitlab-ee/issues/814 I will take this issue soon.
Enabled an automatic merge when the build for 4feece80 succeeds
mentioned in issue #814