REVERT: Remove feature topic on profile button from topic view (#8573)

This commit is contained in:
Mark VanLandingham
2019-12-17 12:41:49 -08:00
committed by GitHub
parent 62ebfbbb67
commit d37dc14c57
5 changed files with 1 additions and 80 deletions

View File

@ -11,7 +11,6 @@ const createArgs = topic => {
toggleMultiSelect: () => {},
deleteTopic: () => {},
recoverTopic: () => {},
toggleFeaturedOnProfile: () => {},
toggleClosed: () => {},
toggleArchived: () => {},
toggleVisibility: () => {},
@ -44,29 +43,6 @@ widgetTest("topic-admin-menu-button is present for admin/moderators", {
}
});
widgetTest(
"topic-admin-menu-button shows for non-admin when the use can feature the topic",
{
template: '{{mount-widget widget="topic-admin-menu-button" args=args}}',
beforeEach() {
this.currentUser.setProperties({
admin: false,
moderator: false,
id: 123
});
const topic = Topic.create({ user_id: this.currentUser.id });
topic.category = Category.create({ read_restricted: false });
this.siteSettings.allow_featured_topic_on_user_profiles = true;
this.set("args", createArgs(topic));
},
test(assert) {
assert.ok(exists(".toggle-admin-menu"), "admin wrench is present");
}
}
);
widgetTest(
"topic-admin-menu-button hides for non-admin when there is no action",
{
@ -85,7 +61,7 @@ widgetTest(
},
test(assert) {
assert.ok(!exists(".toggle-admin-menu"), "admin wrench is present");
assert.ok(!exists(".toggle-admin-menu"), "admin wrench is not present");
}
}
);