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);
|
||||
}
|
||||
|
||||
export function resetPluginApi() {
|
||||
_pluginv01 = null;
|
||||
}
|
||||
|
||||
export function decorateCooked() {
|
||||
console.warn('`decorateCooked` has been removed. Use `getPluginApi(version).decorateCooked` instead');
|
||||
}
|
||||
|
|
|
@ -9,10 +9,6 @@ function findTextarea() {
|
|||
test('details button', () => {
|
||||
visit("/");
|
||||
|
||||
andThen(() => {
|
||||
ok(exists('#create-topic'), 'the create button is visible');
|
||||
});
|
||||
|
||||
click('#create-topic');
|
||||
click('button.options');
|
||||
click('.popup-menu .fa-caret-right');
|
||||
|
|
|
@ -4,6 +4,7 @@ import sessionFixtures from 'fixtures/session-fixtures';
|
|||
import siteFixtures from 'fixtures/site-fixtures';
|
||||
import HeaderComponent from 'discourse/components/site-header';
|
||||
import { forceMobile, resetMobile } from 'discourse/lib/mobile';
|
||||
import { resetPluginApi } from 'discourse/lib/plugin-api';
|
||||
|
||||
function currentUser() {
|
||||
return Discourse.User.create(sessionFixtures['/session/current.json'].current_user);
|
||||
|
@ -74,6 +75,7 @@ function acceptance(name, options) {
|
|||
Discourse.User.resetCurrent();
|
||||
Discourse.Site.resetCurrent(Discourse.Site.create(jQuery.extend(true, {}, fixtures['site.json'].site)));
|
||||
|
||||
resetPluginApi();
|
||||
Discourse.reset();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue