mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 03:29:31 +08:00
FIX: Random failing plugin tests
This commit is contained in:
parent
b07a2baedc
commit
9afa55a3fd
|
@ -368,6 +368,10 @@ function decorate(klass, evt, cb) {
|
||||||
klass.reopen(mixin);
|
klass.reopen(mixin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function resetPluginApi() {
|
||||||
|
_pluginv01 = null;
|
||||||
|
}
|
||||||
|
|
||||||
export function decorateCooked() {
|
export function decorateCooked() {
|
||||||
console.warn('`decorateCooked` has been removed. Use `getPluginApi(version).decorateCooked` instead');
|
console.warn('`decorateCooked` has been removed. Use `getPluginApi(version).decorateCooked` instead');
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,6 @@ function findTextarea() {
|
||||||
test('details button', () => {
|
test('details button', () => {
|
||||||
visit("/");
|
visit("/");
|
||||||
|
|
||||||
andThen(() => {
|
|
||||||
ok(exists('#create-topic'), 'the create button is visible');
|
|
||||||
});
|
|
||||||
|
|
||||||
click('#create-topic');
|
click('#create-topic');
|
||||||
click('button.options');
|
click('button.options');
|
||||||
click('.popup-menu .fa-caret-right');
|
click('.popup-menu .fa-caret-right');
|
||||||
|
|
|
@ -4,6 +4,7 @@ import sessionFixtures from 'fixtures/session-fixtures';
|
||||||
import siteFixtures from 'fixtures/site-fixtures';
|
import siteFixtures from 'fixtures/site-fixtures';
|
||||||
import HeaderComponent from 'discourse/components/site-header';
|
import HeaderComponent from 'discourse/components/site-header';
|
||||||
import { forceMobile, resetMobile } from 'discourse/lib/mobile';
|
import { forceMobile, resetMobile } from 'discourse/lib/mobile';
|
||||||
|
import { resetPluginApi } from 'discourse/lib/plugin-api';
|
||||||
|
|
||||||
function currentUser() {
|
function currentUser() {
|
||||||
return Discourse.User.create(sessionFixtures['/session/current.json'].current_user);
|
return Discourse.User.create(sessionFixtures['/session/current.json'].current_user);
|
||||||
|
@ -74,6 +75,7 @@ function acceptance(name, options) {
|
||||||
Discourse.User.resetCurrent();
|
Discourse.User.resetCurrent();
|
||||||
Discourse.Site.resetCurrent(Discourse.Site.create(jQuery.extend(true, {}, fixtures['site.json'].site)));
|
Discourse.Site.resetCurrent(Discourse.Site.create(jQuery.extend(true, {}, fixtures['site.json'].site)));
|
||||||
|
|
||||||
|
resetPluginApi();
|
||||||
Discourse.reset();
|
Discourse.reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user