mirror of
https://github.com/flarum/core.git
synced 2025-08-11 02:44:04 +02:00
Hello world!
This commit is contained in:
73
ember/tests/.jshintrc
Normal file
73
ember/tests/.jshintrc
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"location",
|
||||
"setTimeout",
|
||||
"$",
|
||||
"QUnit",
|
||||
"define",
|
||||
"console",
|
||||
"equal",
|
||||
"notEqual",
|
||||
"notStrictEqual",
|
||||
"test",
|
||||
"asyncTest",
|
||||
"testBoth",
|
||||
"testWithDefault",
|
||||
"raises",
|
||||
"throws",
|
||||
"deepEqual",
|
||||
"start",
|
||||
"stop",
|
||||
"ok",
|
||||
"strictEqual",
|
||||
"module",
|
||||
"moduleFor",
|
||||
"moduleForComponent",
|
||||
"moduleForModel",
|
||||
"process",
|
||||
"expect",
|
||||
"visit",
|
||||
"exists",
|
||||
"fillIn",
|
||||
"click",
|
||||
"keyEvent",
|
||||
"find",
|
||||
"findWithAssert",
|
||||
"wait",
|
||||
"DS",
|
||||
"keyEvent",
|
||||
"isolatedContainer",
|
||||
"startApp",
|
||||
"andThen",
|
||||
"currentURL",
|
||||
"currentPath",
|
||||
"currentRouteName"
|
||||
],
|
||||
"node": false,
|
||||
"browser": false,
|
||||
"boss": true,
|
||||
"curly": false,
|
||||
"debug": false,
|
||||
"devel": false,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": false,
|
||||
"immed": false,
|
||||
"laxbreak": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": false,
|
||||
"nonew": false,
|
||||
"nomen": false,
|
||||
"onevar": false,
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esnext": true
|
||||
}
|
9
ember/tests/helpers/resolver.js
Normal file
9
ember/tests/helpers/resolver.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import Resolver from 'ember/resolver';
|
||||
|
||||
var resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: 'flarum'
|
||||
};
|
||||
|
||||
export default resolver;
|
30
ember/tests/helpers/start-app.js
Normal file
30
ember/tests/helpers/start-app.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/* global require */
|
||||
|
||||
var Application = require('flarum/app')['default'];
|
||||
var Router = require('flarum/router')['default'];
|
||||
import Ember from 'ember';
|
||||
|
||||
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;
|
||||
|
||||
Router.reopen({
|
||||
location: 'none'
|
||||
});
|
||||
|
||||
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;
|
||||
}
|
49
ember/tests/index.html
Normal file
49
ember/tests/index.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Flarum Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{BASE_TAG}}
|
||||
|
||||
<link rel="stylesheet" href="assets/vendor.css">
|
||||
<link rel="stylesheet" href="assets/flarum.css">
|
||||
<link rel="stylesheet" href="assets/test-support.css">
|
||||
<style>
|
||||
#ember-testing-container {
|
||||
position: absolute;
|
||||
background: white;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 640px;
|
||||
height: 384px;
|
||||
overflow: auto;
|
||||
z-index: 9999;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
#ember-testing {
|
||||
zoom: 50%;
|
||||
}
|
||||
</style>
|
||||
</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>
|
||||
<script src="assets/vendor.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>
|
||||
</body>
|
||||
</html>
|
6
ember/tests/test-helper.js
Normal file
6
ember/tests/test-helper.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import resolver from './helpers/resolver';
|
||||
import { setResolver } from 'ember-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
|
||||
document.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>');
|
0
ember/tests/unit/.gitkeep
Normal file
0
ember/tests/unit/.gitkeep
Normal file
Reference in New Issue
Block a user