diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-02 16:03:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-02 16:03:23 +0300 |
commit | a72a9af092c1bfcf9f8024d59c11cf222f07e1e7 (patch) | |
tree | 44b60265c1d476d026b2862d2c1244748f558d4f /spec/javascripts/helpers | |
parent | b085478c4c2bed74fdc6eb2c33bfc62e791baf03 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/helpers')
-rw-r--r-- | spec/javascripts/helpers/filtered_search_spec_helper.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/spec/javascripts/helpers/filtered_search_spec_helper.js b/spec/javascripts/helpers/filtered_search_spec_helper.js index fd06bb1f324..ceb7982bbc3 100644 --- a/spec/javascripts/helpers/filtered_search_spec_helper.js +++ b/spec/javascripts/helpers/filtered_search_spec_helper.js @@ -1,15 +1,17 @@ export default class FilteredSearchSpecHelper { - static createFilterVisualTokenHTML(name, value, isSelected) { - return FilteredSearchSpecHelper.createFilterVisualToken(name, value, isSelected).outerHTML; + static createFilterVisualTokenHTML(name, operator, value, isSelected) { + return FilteredSearchSpecHelper.createFilterVisualToken(name, operator, value, isSelected) + .outerHTML; } - static createFilterVisualToken(name, value, isSelected = false) { + static createFilterVisualToken(name, operator, value, isSelected = false) { const li = document.createElement('li'); li.classList.add('js-visual-token', 'filtered-search-token', `search-token-${name}`); li.innerHTML = ` <div class="selectable ${isSelected ? 'selected' : ''}" role="button"> <div class="name">${name}</div> + <div class="operator">${operator}</div> <div class="value-container"> <div class="value">${value}</div> <div class="remove-token" role="button"> @@ -30,6 +32,15 @@ export default class FilteredSearchSpecHelper { `; } + static createNameOperatorFilterVisualTokenHTML(name, operator) { + return ` + <li class="js-visual-token filtered-search-token"> + <div class="name">${name}</div> + <div class="operator">${operator}</div> + </li> + `; + } + static createSearchVisualToken(name) { const li = document.createElement('li'); li.classList.add('js-visual-token', 'filtered-search-term'); |