Merge "Revert "Filter account entry suggestions"" into stable-2.15
This commit is contained in:
@@ -119,9 +119,7 @@
|
||||
},
|
||||
|
||||
_getReviewerSuggestions(input) {
|
||||
if (!this.change || !this.change._number) { return Promise.resolve([]); }
|
||||
|
||||
input = `cansee:${this.change._number} ${input}`;
|
||||
if (!this.change) { return Promise.resolve([]); }
|
||||
const api = this.$.restAPI;
|
||||
const xhr = this.allowAnyUser ?
|
||||
api.getSuggestedAccounts(input) :
|
||||
|
||||
@@ -79,7 +79,6 @@ limitations under the License.
|
||||
|
||||
element = fixture('basic');
|
||||
element.change = {
|
||||
_number: 42,
|
||||
owner,
|
||||
reviewers: {
|
||||
CC: [existingReviewer1],
|
||||
@@ -179,14 +178,12 @@ limitations under the License.
|
||||
|
||||
element._getReviewerSuggestions('').then(() => {
|
||||
assert.isTrue(suggestReviewerStub.calledOnce);
|
||||
assert.isTrue(suggestReviewerStub.calledWith(42, 'cansee:42 '));
|
||||
assert.isFalse(suggestAccountStub.called);
|
||||
element.allowAnyUser = true;
|
||||
|
||||
element._getReviewerSuggestions('').then(() => {
|
||||
assert.isTrue(suggestReviewerStub.calledOnce);
|
||||
assert.isTrue(suggestAccountStub.calledOnce);
|
||||
assert.isTrue(suggestAccountStub.calledWith('cansee:42 '));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user