mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-03 20:31:50 -05:00
30 lines
998 B
JavaScript
30 lines
998 B
JavaScript
integration("Topic Discovery");
|
|
|
|
test("Visit Discovery Pages", function() {
|
|
visit("/");
|
|
andThen(function() {
|
|
ok(exists(".topic-list"), "The list of topics was rendered");
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
|
});
|
|
|
|
visit("/c/bug");
|
|
andThen(function() {
|
|
ok(exists(".topic-list"), "The list of topics was rendered");
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
|
ok($('body.category-1').length, "has a custom css class for the category id on the body");
|
|
});
|
|
|
|
visit("/categories");
|
|
andThen(function() {
|
|
ok($('body.category-1').length === 0, "removes the custom category class");
|
|
|
|
ok(exists('.category'), "has a list of categories");
|
|
ok($('body.categories-list').length, "has a custom class to indicate categories");
|
|
});
|
|
|
|
visit("/top");
|
|
andThen(function() {
|
|
ok($('body.categories-list').length === 0, "removes the `categories-list` class");
|
|
ok(exists('.topic-list .topic-list-item'), "has topics");
|
|
});
|
|
});
|