FIX: topic discovery tests

This commit is contained in:
Régis Hanol 2016-08-24 22:53:43 +02:00
parent 7d600d9fee
commit 87f6aadb7e
3 changed files with 4 additions and 5 deletions

View File

@ -18,9 +18,7 @@ test("Visit Discovery Pages", () => {
visit("/categories"); visit("/categories");
andThen(() => { andThen(() => {
ok($('body.category-bug').length === 0, "removes the custom category class"); ok($('body.category-bug').length === 0, "removes the custom category class");
ok(exists('.category'), "has a list of categories");
// TODO: NEED TO FIX THIS
// ok(exists('.category'), "has a list of categories");
ok($('body.categories-list').length, "has a custom class to indicate categories"); ok($('body.categories-list').length, "has a custom class to indicate categories");
}); });

View File

@ -1,7 +1,7 @@
/* exported exists, count, present, blank, containsInstance, not, visible, invisible */ /* exported exists, count, present, blank, containsInstance, not, visible, invisible */
function exists(selector) { function exists(selector) {
return !!count(selector); return count(selector) > 0;
} }
function count(selector) { function count(selector) {

View File

@ -92,6 +92,7 @@ Discourse.SiteSettingsOriginal = {
"available_locales":"cs|da|de|en|es|fr|he|id|it|ja|ko|nb_NO|nl|pl_PL|pt|pt_BR|ru|sv|uk|zh_CN|zh_TW", "available_locales":"cs|da|de|en|es|fr|he|id|it|ja|ko|nb_NO|nl|pl_PL|pt|pt_BR|ru|sv|uk|zh_CN|zh_TW",
"highlighted_languages":"apache|bash|cs|cpp|css|coffeescript|diff|xml|http|ini|json|java|javascript|makefile|markdown|nginx|objectivec|ruby|perl|php|python|sql|handlebars", "highlighted_languages":"apache|bash|cs|cpp|css|coffeescript|diff|xml|http|ini|json|java|javascript|makefile|markdown|nginx|objectivec|ruby|perl|php|python|sql|handlebars",
"enable_emoji":true, "enable_emoji":true,
"emoji_set":"emoji_one" "emoji_set":"emoji_one",
"desktop_category_page_style":"categories_and_latest_topics"
}; };
Discourse.SiteSettings = jQuery.extend(true, {}, Discourse.SiteSettingsOriginal); Discourse.SiteSettings = jQuery.extend(true, {}, Discourse.SiteSettingsOriginal);