FEATURE: Add seen/unseen filters to advanced search UI.

https://meta.discourse.org/t/advanced-search-posts-that-i-have-seen/57966
This commit is contained in:
Guo Xiang Tan
2017-03-09 10:45:43 +08:00
parent 9cc79363e0
commit b419a5765e
4 changed files with 21 additions and 15 deletions

View File

@ -233,15 +233,18 @@ test("update in:private filter through advanced search ui", assert => {
});
});
test("update in:wiki filter through advanced search ui", assert => {
test("update in:seen filter through advanced search ui", assert => {
visit("/search");
fillIn('.search input.full-page-search', 'none');
click('.search-advanced-btn');
click('.search-advanced-options .in-wiki');
click('.search-advanced-options .in-seen');
andThen(() => {
assert.ok(exists('.search-advanced-options .in-wiki:checked'), 'has "are wiki" populated');
assert.equal(find('.search input.full-page-search').val(), "none in:wiki", 'has updated search term to "none in:wiki"');
assert.ok(exists('.search-advanced-options .in-seen:checked'), 'it should check the right checkbox');
assert.equal(find('.search input.full-page-search').val(), "none in:seen",
'it should update the search term'
);
});
});