-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tests for email collaborators pagination #8710
Conversation
@@ -196,7 +200,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) { | |||
} | |||
$searchResult->addResultSet($emailType, $result['wide'], $result['exact']); | |||
|
|||
return true; |
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.
this was a pretty bad assumption, so I had to fix all tests and wrote some where it is actually supposed to be true
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.
Its the default for anything that cannot (or could not) paginate. I took it over as it was when i refactored it.
no test case where you look for $reachedEnd = true? |
if (!$this->shareeEnumeration) { | ||
$result['wide'] = []; | ||
$userResults['wide'] = []; | ||
} else { | ||
$reachedEnd = (count($result['wide']) < $offset + $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.
Isn't the end reached when both sets don't have further elements?
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.
yeah should have been &&
also the answer for @blizzz comment. I messed up when inverting the logic from "more results" to "end reached"
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.
fixed
db8d664
to
d03663c
Compare
failing tests |
Signed-off-by: Joas Schilling <coding@schilljs.com>
d03663c
to
fe30d63
Compare
Codecov Report
@@ Coverage Diff @@
## master #8710 +/- ##
=============================================
- Coverage 51.86% 34.98% -16.89%
- Complexity 25373 25374 +1
=============================================
Files 1607 1607
Lines 95170 95173 +3
Branches 1379 1379
=============================================
- Hits 49362 33297 -16065
- Misses 45808 61876 +16068
|
I messed up conflict resolution on rebase. |
Signed-off-by: Joas Schilling <coding@schilljs.com>
fe30d63
to
8820966
Compare
Backport in #8749 |
Followup to #8596