FEATURE: advanced search option for max posts count (#10761)

This commit adds an option to search for max posts count and updates
the UI for posts count search to show a min/max range in single line.
This commit is contained in:
Arpit Jalan
2020-09-28 21:34:16 +05:30
committed by GitHub
parent 4d1b18f4c6
commit f7940b1d20
7 changed files with 101 additions and 20 deletions
@@ -396,6 +396,26 @@ QUnit.test(
}
);
QUnit.test(
"update max post count through advanced search ui",
async (assert) => {
await visit("/search");
await fillIn(".search-query", "none");
await fillIn("#search-max-post-count", "5");
assert.equal(
find(".search-advanced-options #search-max-post-count").val(),
"5",
'has "5" populated'
);
assert.equal(
find(".search-query").val(),
"none max_posts:5",
'has updated search term to "none max_posts:5"'
);
}
);
QUnit.test("validate advanced search when initially empty", async (assert) => {
await visit("/search?expanded=true");
await click(".search-advanced-options .in-likes");