diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html
index 68b2c23daa..cf5e0b187f 100644
--- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html
+++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html
@@ -96,7 +96,7 @@ limitations under the License.
diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.html b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.html
index a93beb1f67..fbc6217519 100644
--- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.html
+++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.html
@@ -58,7 +58,7 @@ limitations under the License.
stub('gr-rest-api-interface', {
getSuggestedProjects(input) {
- if (input.startsWith('the')) {
+ if (input.startsWith('th')) {
return Promise.resolve({'the project': {
id: 'the project',
state: 'ACTIVE',
@@ -122,6 +122,14 @@ limitations under the License.
});
});
+ test('_getProjectSuggestions non-empty with two letter project', done => {
+ element._getProjectSuggestions('th').then(projects => {
+ assert.equal(projects.length, 1);
+ assert.equal(projects[0].name, 'the project');
+ done();
+ });
+ });
+
test('_canAddProject', () => {
assert.isFalse(element._canAddProject(null, null));
assert.isFalse(element._canAddProject({}, null));
|