2015-07-15 11:16:49 -04:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
acceptance("Search - Full Page");
|
|
|
|
|
2016-08-09 12:16:29 -04:00
|
|
|
test("perform various searches", assert => {
|
|
|
|
visit("/search");
|
|
|
|
|
|
|
|
andThen(() => {
|
|
|
|
assert.ok(find('input.search').length > 0);
|
2016-08-09 13:22:14 -04:00
|
|
|
assert.ok(find('.fps-topic').length === 0);
|
2016-08-09 12:16:29 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
fillIn('.search input', 'none');
|
|
|
|
click('.search .btn-primary');
|
|
|
|
|
2016-08-09 13:22:14 -04:00
|
|
|
andThen(() => assert.ok(find('.fps-topic').length === 0), 'has no results');
|
2016-08-09 12:16:29 -04:00
|
|
|
|
|
|
|
fillIn('.search input', 'posts');
|
|
|
|
click('.search .btn-primary');
|
|
|
|
|
2016-08-09 13:22:14 -04:00
|
|
|
andThen(() => assert.ok(find('.fps-topic').length === 1, 'has one post'));
|
2016-08-09 12:16:29 -04:00
|
|
|
});
|