2014-07-30 13:27:14 -04:00
|
|
|
integration("Topic Discovery");
|
2013-06-13 15:08:42 -04:00
|
|
|
|
2015-03-19 07:22:56 -04:00
|
|
|
test("Visit Discovery Pages", () => {
|
2014-07-30 13:27:14 -04:00
|
|
|
visit("/");
|
2015-03-19 07:22:56 -04:00
|
|
|
andThen(() => {
|
2014-07-29 17:38:36 -04:00
|
|
|
ok(exists(".topic-list"), "The list of topics was rendered");
|
|
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
2013-06-13 15:08:42 -04:00
|
|
|
});
|
2013-07-04 16:19:59 -04:00
|
|
|
|
2014-10-16 12:15:31 -04:00
|
|
|
visit("/c/bug");
|
2015-03-19 07:22:56 -04:00
|
|
|
andThen(() => {
|
2014-07-29 17:38:36 -04:00
|
|
|
ok(exists(".topic-list"), "The list of topics was rendered");
|
|
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
2015-01-27 17:44:47 -05:00
|
|
|
ok($('body.category-bug').length, "has a custom css class for the category id on the body");
|
2013-07-04 16:19:59 -04:00
|
|
|
});
|
2013-06-20 15:02:02 -04:00
|
|
|
|
2014-07-30 13:27:14 -04:00
|
|
|
visit("/categories");
|
2015-03-19 07:22:56 -04:00
|
|
|
andThen(() => {
|
2015-01-26 17:49:15 -05:00
|
|
|
ok($('body.category-bug').length === 0, "removes the custom category class");
|
2015-01-21 14:34:01 -05:00
|
|
|
|
2013-12-11 15:23:41 -05:00
|
|
|
ok(exists('.category'), "has a list of categories");
|
2015-01-21 14:34:01 -05:00
|
|
|
ok($('body.categories-list').length, "has a custom class to indicate categories");
|
2013-06-20 15:02:02 -04:00
|
|
|
});
|
2014-07-31 18:07:04 -04:00
|
|
|
|
|
|
|
visit("/top");
|
2015-03-19 07:22:56 -04:00
|
|
|
andThen(() => {
|
2015-01-21 14:34:01 -05:00
|
|
|
ok($('body.categories-list').length === 0, "removes the `categories-list` class");
|
2014-08-28 14:34:31 -04:00
|
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
2014-07-31 18:07:04 -04:00
|
|
|
});
|
2013-06-20 15:02:02 -04:00
|
|
|
});
|