From ca4130f30d49e5460bb38a2e0c14b0c35026a464 Mon Sep 17 00:00:00 2001 From: cpradio Date: Tue, 11 Oct 2016 17:41:04 -0400 Subject: [PATCH] FIX: Use @username instead of user:username --- .../discourse/components/search-advanced-options.js.es6 | 4 ++-- test/javascripts/acceptance/search-full-test.js.es6 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 b/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 index 6fabacccc87..6f988b310f8 100644 --- a/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 +++ b/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 @@ -99,9 +99,9 @@ export default Em.Component.extend({ const userFilter = this.get('searchedTerms.username'); if (userFilter && userFilter.length !== 0) if (match.length !== 0) - searchTerm = searchTerm.replace(match, ` user:${userFilter}`); + searchTerm = searchTerm.replace(match, ` @${userFilter}`); else - searchTerm += ` user:${userFilter}`; + searchTerm += ` @${userFilter}`; else if (match.length !== 0) searchTerm = searchTerm.replace(match, ''); diff --git a/test/javascripts/acceptance/search-full-test.js.es6 b/test/javascripts/acceptance/search-full-test.js.es6 index 248efe47454..931d2c69cd4 100644 --- a/test/javascripts/acceptance/search-full-test.js.es6 +++ b/test/javascripts/acceptance/search-full-test.js.es6 @@ -105,7 +105,7 @@ test("update username through advanced search ui", assert => { andThen(() => { assert.ok(exists('.search-options span:contains("admin")'), 'has "admin" pre-populated'); - assert.equal(find('.search input.full-page-search').val(), "none user:admin", 'has updated search term to "none user:admin"'); + assert.equal(find('.search input.full-page-search').val(), "none @admin", 'has updated search term to "none user:admin"'); }); }); });