2015-06-23 02:05:35 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
acceptance("Search");
|
|
|
|
|
|
|
|
test("search", (assert) => {
|
|
|
|
visit("/");
|
|
|
|
|
|
|
|
click('#search-button');
|
|
|
|
|
|
|
|
andThen(() => {
|
|
|
|
assert.ok(exists('#search-term'), 'it shows the search bar');
|
2015-08-27 04:55:01 +08:00
|
|
|
assert.ok(!exists('.search-menu .results ul li'), 'no results by default');
|
2015-06-23 02:05:35 +08:00
|
|
|
});
|
|
|
|
|
2015-08-11 03:31:10 +08:00
|
|
|
fillIn('#search-term', 'dev');
|
2016-04-15 03:23:05 +08:00
|
|
|
keyEvent('#search-term', 'keyup', 16);
|
2015-08-11 03:31:10 +08:00
|
|
|
andThen(() => {
|
2015-08-27 04:55:01 +08:00
|
|
|
assert.ok(exists('.search-menu .results ul li'), 'it shows results');
|
2015-08-11 03:31:10 +08:00
|
|
|
});
|
2015-06-23 02:05:35 +08:00
|
|
|
});
|