2016-06-30 13:21:47 +03:00
|
|
|
import {assign} from 'ember-platform';
|
|
|
|
import run from 'ember-runloop';
|
2015-02-13 07:22:32 +03:00
|
|
|
import Application from '../../app';
|
|
|
|
import config from '../../config/environment';
|
2017-03-02 21:35:09 +03:00
|
|
|
import registerPowerSelectHelpers from '../../tests/helpers/ember-power-select';
|
2017-04-11 16:39:45 +03:00
|
|
|
import registerPowerDatepickerHelpers from '../../tests/helpers/ember-power-datepicker';
|
2016-11-14 16:16:51 +03:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2016-05-27 15:27:46 +03:00
|
|
|
import fileUpload from './file-upload';
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2017-03-02 21:35:09 +03:00
|
|
|
registerPowerSelectHelpers();
|
2017-04-11 16:39:45 +03:00
|
|
|
registerPowerDatepickerHelpers();
|
2017-03-02 21:35:09 +03:00
|
|
|
|
2015-09-03 13:03:45 +03:00
|
|
|
export default function startApp(attrs) {
|
2017-01-19 16:31:56 +03:00
|
|
|
let attributes = assign({}, config.APP);
|
|
|
|
attributes = assign(attributes, attrs); // use defaults, but you can override;
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2017-03-28 13:29:18 +03:00
|
|
|
return run(() => {
|
|
|
|
let application = Application.create(attributes);
|
2015-02-19 03:11:42 +03:00
|
|
|
application.setupForTesting();
|
|
|
|
application.injectTestHelpers();
|
2017-03-28 13:29:18 +03:00
|
|
|
return application;
|
2015-02-19 03:11:42 +03:00
|
|
|
});
|
2015-02-13 07:22:32 +03:00
|
|
|
}
|