mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
FIX: Regressions in JS test suite
This commit is contained in:
parent
c44371b4ac
commit
3660b85614
@ -4,10 +4,7 @@ import { ButtonClass } from "discourse/widgets/button";
|
||||
|
||||
createWidget(
|
||||
"post-admin-menu-button",
|
||||
jQuery.extend(ButtonClass, {
|
||||
tagName: "li.btn",
|
||||
secondaryAction: "closeAdminMenu"
|
||||
})
|
||||
jQuery.extend(ButtonClass, { tagName: "li.btn" })
|
||||
);
|
||||
|
||||
export function buildManageButtons(attrs, currentUser, siteSettings) {
|
||||
@ -117,6 +114,7 @@ export default createWidget("post-admin-menu", {
|
||||
|
||||
buildManageButtons(this.attrs, this.currentUser, this.siteSettings).forEach(
|
||||
b => {
|
||||
b.secondaryAction = "closeAdminMenu";
|
||||
contents.push(this.attach("post-admin-menu-button", b));
|
||||
}
|
||||
);
|
||||
|
@ -54,14 +54,14 @@ widgetTest("staff menu", {
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({
|
||||
staff: true,
|
||||
site_flagged_posts_count: 3
|
||||
reviewable_count: 3
|
||||
});
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
assert.ok(find(".admin-link").length);
|
||||
assert.ok(find(".flagged-posts-link").length);
|
||||
assert.equal(find(".flagged-posts").text(), "3");
|
||||
assert.ok(find(".review").length);
|
||||
assert.equal(find(".reviewables").text(), "3");
|
||||
assert.ok(!find(".settings-link").length);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user