New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: limited search results #4981
Conversation
You've signed the CLA, dmacjam. Thank you! This pull request is ready for review. |
The tests need to be a bit smarter here, they should ensure the offset is correct by checking to see that when you ask for page 2 you get proper page 2 results in expected order. |
spec/components/search_spec.rb
Outdated
|
||
expect(results.posts.length).to eq(number_of_results) | ||
expect(results.more_full_page_results).to eq(true) | ||
expect(results2.posts.length).to eq(number_of_results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check here that post ids aren't same as the first page. This test will pass if the page param is ignored I think.
Added infinite loading of search results and rspec tests for pagination are fixed. Thanks for suggestion. |
@@ -158,6 +162,11 @@ export default Ember.Controller.extend({ | |||
return iconHTML(expanded ? "caret-down" : "caret-right"); | |||
}, | |||
|
|||
@computed('page') | |||
isLastPage(page) { | |||
return page == PAGE_LIMIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ===
instead of ==
. js tests are failing.
968eb06
to
f8edf26
Compare
This pull request has been mentioned on Discourse Meta. There might be relevant details there: https://meta.discourse.org/t/search-results-limited-to-50-each-time/34270/12 |
when can we merge this? |
If there are more full-page search results available, inform users about that.
Related discussion:
https://meta.discourse.org/t/results-missing-from-search/64969
https://meta.discourse.org/t/search-results-limited-to-50-each-time/34270