UX: Use date picker on full page search
This commit is contained in:
parent
7669146897
commit
7533e5b541
|
@ -76,7 +76,7 @@
|
|||
<label class="control-label" for="search-post-date">{{i18n "search.advanced.post.time.label"}}</label>
|
||||
<div class="controls">
|
||||
{{combo-box id="postTime" valueAttribute="value" content=postTimeOptions value=searchedTerms.time.when}}
|
||||
{{input type="date" value=searchedTerms.time.days class="input-small" id='search-post-date'}}
|
||||
{{date-picker value=searchedTerms.time.days id="search-post-date"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group pull-left">
|
||||
|
|
|
@ -285,14 +285,13 @@ QUnit.test("update post time through advanced search ui", assert => {
|
|||
visit("/search");
|
||||
fillIn('.search input.full-page-search', 'none');
|
||||
click('.search-advanced-btn');
|
||||
fillIn('#search-post-date', '2016-10-05');
|
||||
fillIn('#search-post-date .date-picker', '2016-10-05');
|
||||
expandSelectKit('.search-advanced-options .select-kit#postTime');
|
||||
selectKitSelectRow('after', { selector: '.search-advanced-options .select-kit#postTime' });
|
||||
fillIn('.search-advanced-options .select-kit#postTime', 'after');
|
||||
|
||||
andThen(() => {
|
||||
assert.ok(exists(selectKit('.search-advanced-options .select-kit#postTime').rowByName("after").el), 'has "after" populated');
|
||||
assert.equal(find('.search-advanced-options #search-post-date').val(), "2016-10-05", 'has "2016-10-05" populated');
|
||||
assert.equal(find('.search input.full-page-search').val(), "none after:2016-10-05", 'has updated search term to "none after:2016-10-05"');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue