Skip to content

A platform for community discussion. Free, open, simple.

FIX: Remove computed property setting from hamburger test

Robin Ward01cd371be5ce
diff --git a/test/javascripts/widgets/hamburger-menu-test.js b/test/javascripts/widgets/hamburger-menu-test.js
index 4cd87d7a03b..675e85352eb 100644
--- a/test/javascripts/widgets/hamburger-menu-test.js
+++ b/test/javascripts/widgets/hamburger-menu-test.js
@@ -177,10 +177,22 @@ widgetTest("top categories", {
c.set("notification_level", NotificationLevels.MUTED);
} else if (unreadCategoryIds.length === 0) {
unreadCategoryIds.push(c.id);
- c.set("unreadTopics", 5);
+ for (let i = 0; i < 5; i++) {
+ c.topicTrackingState.states["t123" + i] = {
+ category_id: c.id,
+ last_read_post_number: 1,
+ highest_post_number: 2,
+ notification_level: NotificationLevels.TRACKING
+ };
+ }
} else {
unreadCategoryIds.splice(0, 0, c.id);
- c.set("newTopics", 10);
+ for (let i = 0; i < 10; i++) {
+ c.topicTrackingState.states["t321" + i] = {
+ category_id: c.id,
+ last_read_post_number: null
+ };
+ }
return false;
}
}