FIX: Post time query filter not set correctly when loaded from params.

https://meta.discourse.org/t/before-and-after-are-not-implemented-right-in-search/92515
This commit is contained in:
Guo Xiang Tan
2018-08-23 14:05:12 +08:00
parent cbd9045c6b
commit bd66fbef7f
2 changed files with 24 additions and 2 deletions
@@ -354,6 +354,14 @@ QUnit.test("update status through advanced search ui", async assert => {
});
QUnit.test("update post time through advanced search ui", async assert => {
await visit("/search?expanded=true&q=after:2018-08-22");
assert.equal(
find(".search-query").val(),
"after:2018-08-22",
"it should update the search term correctly"
);
const postTimeSelector = selectKit(
".search-advanced-options .select-kit#postTime"
);
@@ -369,6 +377,7 @@ QUnit.test("update post time through advanced search ui", async assert => {
postTimeSelector.rowByName("after").exists(),
'has "after" populated'
);
assert.equal(
find(".search-query").val(),
"none after:2016-10-05",