FIX: Random failing plugin tests

This commit is contained in:
Robin Ward 2016-11-22 15:36:18 -05:00
parent b07a2baedc
commit 9afa55a3fd
3 changed files with 6 additions and 4 deletions

View File

@ -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');
}

View File

@ -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');

View File

@ -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();
}
});