mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Upgrade ember-cli to 0.1.4 and fix related breakage. closes #18
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"location",
|
||||
"setTimeout",
|
||||
"$",
|
||||
"-Promise",
|
||||
"QUnit",
|
||||
"define",
|
||||
"console",
|
||||
@@ -33,11 +34,11 @@
|
||||
"fillIn",
|
||||
"click",
|
||||
"keyEvent",
|
||||
"triggerEvent",
|
||||
"find",
|
||||
"findWithAssert",
|
||||
"wait",
|
||||
"DS",
|
||||
"keyEvent",
|
||||
"isolatedContainer",
|
||||
"startApp",
|
||||
"andThen",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
import Resolver from 'ember/resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
var resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: 'flarum'
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
|
@@ -1,30 +1,19 @@
|
||||
/* global require */
|
||||
|
||||
var Application = require('flarum/app')['default'];
|
||||
var Router = require('flarum/router')['default'];
|
||||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import Router from '../../router';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
var App;
|
||||
|
||||
var attributes = Ember.merge({
|
||||
// useful Test defaults
|
||||
rootElement: '#ember-testing',
|
||||
LOG_ACTIVE_GENERATION:false,
|
||||
LOG_VIEW_LOOKUPS: false
|
||||
}, attrs); // but you can override;
|
||||
var attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
Router.reopen({
|
||||
location: 'none'
|
||||
});
|
||||
|
||||
Ember.run(function(){
|
||||
Ember.run(function() {
|
||||
App = Application.create(attributes);
|
||||
App.setupForTesting();
|
||||
App.injectTestHelpers();
|
||||
});
|
||||
|
||||
App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
|
||||
|
||||
return App;
|
||||
}
|
||||
|
@@ -7,7 +7,8 @@
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{BASE_TAG}}
|
||||
{{content-for 'head'}}
|
||||
{{content-for 'test-head'}}
|
||||
|
||||
<link rel="stylesheet" href="assets/vendor.css">
|
||||
<link rel="stylesheet" href="assets/flarum.css">
|
||||
@@ -28,22 +29,21 @@
|
||||
zoom: 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{content-for 'head-footer'}}
|
||||
{{content-for 'test-head-footer'}}
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<script>
|
||||
window.FlarumENV = {{ENV}};
|
||||
window.EmberENV = window.FlarumENV.EmberENV;
|
||||
</script>
|
||||
<script src="assets/test-support.js"></script>
|
||||
{{content-for 'body'}}
|
||||
{{content-for 'test-body'}}
|
||||
<script src="assets/vendor.js"></script>
|
||||
<script src="assets/test-support.js"></script>
|
||||
<script src="assets/flarum.js"></script>
|
||||
<script src="testem.js"></script>
|
||||
<script>
|
||||
require('flarum/tests/test-helper');
|
||||
</script>
|
||||
<script src="assets/test-loader.js"></script>
|
||||
|
||||
{{content-for 'body-footer'}}
|
||||
{{content-for 'test-body-footer'}}
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,6 +1,12 @@
|
||||
import resolver from './helpers/resolver';
|
||||
import { setResolver } from 'ember-qunit';
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
|
||||
document.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>');
|
||||
|
||||
QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
|
||||
var containerVisibility = QUnit.urlParams.nocontainer ? 'hidden' : 'visible';
|
||||
document.getElementById('ember-testing-container').style.visibility = containerVisibility;
|
||||
|
Reference in New Issue
Block a user