mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 08:44:48 +08:00
REVERT: Remove feature topic on profile button from topic view (#8573)
This commit is contained in:

committed by
GitHub

parent
62ebfbbb67
commit
d37dc14c57
@ -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");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user