1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 22:59:43 +02:00
documize/gui/tests/helpers/module-for-acceptance.js
Harvey Kandola b31ab712c1 upgraded Ember and integrated Bootstrap 4
Upgraded to Ember JS 2.16.x release. This upgrade uses the new JavaScript modules API syntax.

Integrated Bootstrap 4 Beta 2 via package.json and associated popper.js library. Overridden Bootstrap styles using bootstrap.scss -- this file selectively imports the modules we need.
2017-11-16 13:28:05 +00:00

30 lines
887 B
JavaScript

import { resolve } from 'rsvp';
import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
localStorage.setItem('folder', 'VzMuyEw_3WqiafcG');
stubAudit(this);
stubUserNotification(this);
server.createList('folder', 2);
server.createList('user', 2);
server.createList('document', 2);
server.createList('permission', 4);
// server.createList('folder-permission', 2);
server.createList('organization', 1);
if (options.beforeEach) {
return options.beforeEach.apply(this, arguments);
}
},
afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return resolve(afterEach).then(() => destroyApp(this.application));
}
});
}