mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 23:54:25 +08:00
22 lines
562 B
JavaScript
22 lines
562 B
JavaScript
import { acceptance } from "helpers/qunit-helpers";
|
|
acceptance("Search - Full Page");
|
|
|
|
test("perform various searches", assert => {
|
|
visit("/search");
|
|
|
|
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'));
|
|
});
|