Skip to content
Snippets Groups Projects

Fix pagination on search result page when ES search is enabled

Merged Valery Sizov requested to merge es_fox_pagination into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • 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
    • You can actually do that in a more concise way: create_list(:issue, 21, project: @project). Btw, we could maybe avoid creating 21 records, but changing the Kaminari.default_per_page in this test?

    • Author Contributor

      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.

    • Author Contributor

      actually create_list does not allow to use sequence like this "initial #{i}" but I think I can use just create_list(:issue, 21, project: @project, title: 'initial')

    • I don't think it's good idea. Integration tests should not use mock.

      I was not suggesting using mocks, I was suggesting actually overriding the value: e.g. Kaminari.default_per_page = 2, but we can keep the 21 objects...

    • Please register or sign in to reply
  • @vsizov I had a few suggestions regarding the tests, but the actual fix looks good to me.

  • Reassigned to @vsizov

  • Valery Sizov Added 1 commit:

    Added 1 commit:

  • Valery Sizov Added 3 commits:

    Added 3 commits:

  • Valery Sizov Added 1 commit:

    Added 1 commit:

    • 4feece80 - Fix pagination on search result page when ES search is enabled
  • Reassigned to @rymai

  • @vsizov Thanks, LGTM!

  • 1 module SearchHelpers
  • username-removed-128633 Enabled an automatic merge when the build for 4feece80 succeeds

    Enabled an automatic merge when the build for 4feece80 succeeds

  • Valery Sizov mentioned in issue #814

    mentioned in issue #814

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading