2015-02-13 07:22:32 +03:00
|
|
|
import Application from '../../app';
|
|
|
|
import config from '../../config/environment';
|
2017-05-29 21:50:03 +03:00
|
|
|
import fileUpload from './file-upload'; // eslint-disable-line
|
2017-04-11 16:39:45 +03:00
|
|
|
import registerPowerDatepickerHelpers from '../../tests/helpers/ember-power-datepicker';
|
2017-05-29 21:50:03 +03:00
|
|
|
import registerPowerSelectHelpers from '../../tests/helpers/ember-power-select';
|
|
|
|
import run from 'ember-runloop';
|
|
|
|
import {assign} from 'ember-platform';
|
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
|
|
|
}
|