mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Category List and Topic View Integration Test
This commit is contained in:
@@ -1,14 +1,25 @@
|
||||
integration("List Topics");
|
||||
|
||||
test("/", function() {
|
||||
test("Default List", function() {
|
||||
|
||||
visit("/").then(function() {
|
||||
expect(2);
|
||||
|
||||
ok(exists("#topic-list"), "The list of topics was rendered");
|
||||
ok(count('#topic-list .topic-list-item') > 0, "has topics");
|
||||
ok(exists('#topic-list .topic-list-item'), "has topics");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test("Categories List", function() {
|
||||
|
||||
visit("/categories").then(function() {
|
||||
expect(1);
|
||||
|
||||
ok(exists('.category-list-item'), "has a list of categories");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
12
test/javascripts/integration/view_topic_test.js
Normal file
12
test/javascripts/integration/view_topic_test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
integration("View Topic");
|
||||
|
||||
test("View a Topic", function() {
|
||||
|
||||
visit("/t/internationalization-localization/280").then(function() {
|
||||
expect(2);
|
||||
|
||||
ok(exists("#topic"), "The was rendered");
|
||||
ok(exists("#topic .topic-post"), "The topic has posts");
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user