Add back acceptance tests for full page search
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Search - Full Page");
|
||||
|
||||
// TODO: needs fixing (cc @sam)
|
||||
// test("search", (assert) => {
|
||||
// visit("/search?q=trout");
|
||||
test("perform various searches", assert => {
|
||||
visit("/search");
|
||||
|
||||
// andThen(() => {
|
||||
// assert.ok(find('input.search').length > 0);
|
||||
// assert.ok(find('.topic-list-item').length > 0);
|
||||
// });
|
||||
// });
|
||||
andThen(() => {
|
||||
assert.ok(find('input.search').length > 0);
|
||||
assert.ok(find('.topic').length === 0);
|
||||
});
|
||||
|
||||
fillIn('.search input', 'none');
|
||||
click('.search .btn-primary');
|
||||
|
||||
andThen(() => assert.ok(find('.topic').length === 0), 'has no results');
|
||||
|
||||
fillIn('.search input', 'posts');
|
||||
click('.search .btn-primary');
|
||||
|
||||
andThen(() => assert.ok(find('.topic').length === 1, 'has one post'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user