Add count to search field placeholder

This commit is contained in:
Buck Doyle 2020-11-09 09:32:49 -06:00
parent 7b25b43ec6
commit a1ea822ab7
3 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<SearchBox
data-test-recommendation-summaries-search
@searchTerm={{mut this.searchTerm}}
@placeholder="Search recommendations..." />
@placeholder="Search {{this.model.length}} {{pluralize "recommendation" this.model.length}}..." />
{{/if}}
</div>
<div class="toolbar-item is-right-aligned is-mobile-full-width">

View File

@ -383,6 +383,8 @@ module('Acceptance | optimize search and facets', function(hooks) {
await Optimize.visit();
assert.equal(Optimize.search.placeholder, `Search ${Optimize.recommendationSummaries.length} recommendations...`);
await Optimize.search.fillIn('ooo');
assert.equal(Optimize.recommendationSummaries.length, 2);

View File

@ -26,6 +26,7 @@ export default create({
search: {
scope: '[data-test-recommendation-summaries-search] input',
placeholder: attribute('placeholder'),
},
card: recommendationCard,