summaryrefslogtreecommitdiff
path: root/spec/javascripts/helpers
diff options
context:
space:
mode:
authorwinh <winnie@gitlab.com>2017-05-18 20:53:14 +0200
committerwinh <winnie@gitlab.com>2017-06-02 16:30:37 +0200
commit0583916d2d9ad19ae342a13ff2a31c9e3bb76547 (patch)
tree967b2e45b0f60de7b4a0880b35ef5408e05f6e6c /spec/javascripts/helpers
parentf032731e47f2ce1c2feb6ff866754202efb6844b (diff)
downloadgitlab-ce-0583916d2d9ad19ae342a13ff2a31c9e3bb76547.tar.gz
Style people in issuable search bar (!11402)winh-styled-people-search-bar
Diffstat (limited to 'spec/javascripts/helpers')
-rw-r--r--spec/javascripts/helpers/filtered_search_spec_helper.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/javascripts/helpers/filtered_search_spec_helper.js b/spec/javascripts/helpers/filtered_search_spec_helper.js
index 0d7092a2357..8933dd5def4 100644
--- a/spec/javascripts/helpers/filtered_search_spec_helper.js
+++ b/spec/javascripts/helpers/filtered_search_spec_helper.js
@@ -30,12 +30,15 @@ export default class FilteredSearchSpecHelper {
`;
}
+ static createSearchVisualToken(name) {
+ const li = document.createElement('li');
+ li.classList.add('js-visual-token', 'filtered-search-term');
+ li.innerHTML = `<div class="name">${name}</div>`;
+ return li;
+ }
+
static createSearchVisualTokenHTML(name) {
- return `
- <li class="js-visual-token filtered-search-term">
- <div class="name">${name}</div>
- </li>
- `;
+ return FilteredSearchSpecHelper.createSearchVisualToken(name).outerHTML;
}
static createInputHTML(placeholder = '', value = '') {