mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Upgrade QUnit to latest version
This commit is contained in:
@ -17,7 +17,7 @@ widgetTest('basics', {
|
||||
widgetTest('log out', {
|
||||
template: '{{mount-widget widget="user-menu" logout="logout"}}',
|
||||
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.on('logout', () => this.loggedOut = true);
|
||||
},
|
||||
|
||||
@ -33,7 +33,7 @@ widgetTest('log out', {
|
||||
|
||||
widgetTest('private messages - disabled', {
|
||||
template: '{{mount-widget widget="user-menu"}}',
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.siteSettings.enable_private_messages = false;
|
||||
},
|
||||
|
||||
@ -44,7 +44,7 @@ widgetTest('private messages - disabled', {
|
||||
|
||||
widgetTest('private messages - enabled', {
|
||||
template: '{{mount-widget widget="user-menu"}}',
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.siteSettings.enable_private_messages = true;
|
||||
},
|
||||
|
||||
@ -56,7 +56,7 @@ widgetTest('private messages - enabled', {
|
||||
widgetTest('anonymous', {
|
||||
template: '{{mount-widget widget="user-menu" toggleAnonymous="toggleAnonymous"}}',
|
||||
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({ is_anonymous: false, trust_level: 3 });
|
||||
this.siteSettings.allow_anonymous_posting = true;
|
||||
this.siteSettings.anonymous_posting_min_trust_level = 3;
|
||||
@ -76,7 +76,7 @@ widgetTest('anonymous', {
|
||||
widgetTest('anonymous - disabled', {
|
||||
template: '{{mount-widget widget="user-menu"}}',
|
||||
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.siteSettings.allow_anonymous_posting = false;
|
||||
},
|
||||
|
||||
@ -88,7 +88,7 @@ widgetTest('anonymous - disabled', {
|
||||
widgetTest('anonymous - switch back', {
|
||||
template: '{{mount-widget widget="user-menu" toggleAnonymous="toggleAnonymous"}}',
|
||||
|
||||
setup() {
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({ is_anonymous: true });
|
||||
this.siteSettings.allow_anonymous_posting = true;
|
||||
|
||||
@ -103,4 +103,3 @@ widgetTest('anonymous - switch back', {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user