mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
fix tests
This commit is contained in:
@@ -50,6 +50,7 @@ before_script:
|
||||
- "./bin/developer phraseanet:regenerate-sqlite"
|
||||
- "./bin/developer phraseanet:generate-js-fixtures"
|
||||
script:
|
||||
- "./node_modules/.bin/gulp test"
|
||||
- |
|
||||
if [ "$TEST_SUITE" = "1" ]; then
|
||||
"./bin/phpunit" "tests/classes/";
|
||||
|
@@ -42,5 +42,6 @@ database:
|
||||
|
||||
test:
|
||||
override:
|
||||
- case $CIRCLE_NODE_INDEX in 0) php -d memory_limit=-1 bin/phpunit --exclude-group legacy ;; 1) ./node_modules/.bin/gulp test ;; 2) php -d memory_limit=-1 bin/phpunit --group legacy --exclude-group web ;; 3) php -d memory_limit=-1 bin/phpunit --group web ;; esac:
|
||||
- case $CIRCLE_NODE_INDEX in 0) php -d memory_limit=-1 bin/phpunit --exclude-group legacy ;; 1) php -d memory_limit=-1 bin/phpunit --group legacy --exclude-group web ;; 2) php -d memory_limit=-1 bin/phpunit --group web ;; esac:
|
||||
parallel: true
|
||||
|
@@ -1,6 +1,7 @@
|
||||
var gulp = require('gulp');
|
||||
var config = require('../config.js');
|
||||
var utils = require('../utils.js');
|
||||
var qunit = require('gulp-qunit');
|
||||
var debugMode = false;
|
||||
|
||||
|
||||
@@ -107,6 +108,12 @@ gulp.task('build-prod-js', function(){
|
||||
];
|
||||
return utils.buildJsGroup(prodGroup, 'prod', 'prod/js', debugMode);
|
||||
});
|
||||
|
||||
gulp.task('test-prod', function () {
|
||||
return gulp.src(config.paths.src + 'prod/js/tests/*.html')
|
||||
.pipe(qunit());
|
||||
});
|
||||
|
||||
gulp.task('watch-prod-js', function() {
|
||||
debugMode = true;
|
||||
return gulp.watch(config.paths.src + 'prod/**/*.js', ['build-prod-js']);
|
||||
|
@@ -4,14 +4,8 @@ var mochaPhantomjs = require('gulp-mocha-phantomjs');
|
||||
|
||||
var config = require('./config.js');
|
||||
|
||||
var paths = {
|
||||
vendors: 'tmp-assets/',
|
||||
dist: 'www/assets/'
|
||||
};
|
||||
|
||||
|
||||
gulp.task('mocha_phantomjs', function () {
|
||||
return gulp.src('www/scripts/tests/*.html')
|
||||
return gulp.src('www/scripts/tests/!*.html')
|
||||
.pipe(mochaPhantomjs({
|
||||
'reporter': 'dot',
|
||||
'setting': [
|
||||
@@ -20,11 +14,11 @@ gulp.task('mocha_phantomjs', function () {
|
||||
}));
|
||||
});
|
||||
|
||||
gulp.task('qunit', function () {
|
||||
return gulp.src('www/include/js/tests/*.html')
|
||||
.pipe(qunit());
|
||||
gulp.task('test-components', function () {
|
||||
return gulp.start('test-prod');
|
||||
});
|
||||
|
||||
|
||||
// js fixtures should be present (./bin/developer phraseanet:generate-js-fixtures)
|
||||
gulp.task('test', ['qunit','mocha_phantomjs']);
|
||||
// JS fixtures should be present (./bin/developer phraseanet:generate-js-fixtures)
|
||||
// Note: fixture are loaded into scripts/tests/fixtures directory using
|
||||
// bin/developer phraseanet:regenerate-js-fixtures
|
||||
gulp.task('test', ['test-components']);
|
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script src="../../../assets/jquery/jquery.js"></script>
|
||||
<script src="../../../assets/qunit/qunit.js"></script>
|
||||
<script src="../../../../../www/assets/vendors/jquery/jquery.js"></script>
|
||||
<script src="../../../../../www/bower_components/qunit/qunit/qunit.js"></script>
|
||||
<script src="../jquery.Edit.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../assets/qunit/qunit.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="../../../../../www/bower_components/qunit/qunit/qunit.css"/>
|
||||
<script> $(document).ready(function(){
|
||||
|
||||
// disable log messages in tests
|
||||
|
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script src="../../../assets/jquery/jquery.js"></script>
|
||||
<script src="../../../assets/qunit/qunit.js"></script>
|
||||
<script src="../../../../../www/assets/vendors/jquery/jquery.js"></script>
|
||||
<script src="../../../../../www/bower_components/qunit/qunit/qunit.js"></script>
|
||||
<script src="../jquery.Selection.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../assets/qunit/qunit.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="../../../../../www/bower_components/qunit/qunit/qunit.css"/>
|
||||
<script> $(document).ready(function(){
|
||||
|
||||
|
||||
|
@@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<script src="../../../assets/jquery/jquery.js"></script>
|
||||
<script src="../../../assets/jquery.ui/jquery-ui.js"></script>
|
||||
<script src="../../../assets/qunit/qunit.js"></script>
|
||||
<script src="../../../assets/blueimp-load-image/load-image.js"></script>
|
||||
<script src="../../../skins/prod/jquery.Upload.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../assets/qunit/qunit.css"/>
|
||||
<script src="../../../../../www/assets/vendors/jquery/jquery.js"></script>
|
||||
<script src="../../../../../www/assets/vendors/jquery-ui/jquery-ui.js"></script>
|
||||
<script src="../../../../../www/bower_components/qunit/qunit/qunit.js"></script>
|
||||
<script src="../../../../../www/assets/vendors/blueimp-load-image/load-image.js"></script>
|
||||
<script src="../jquery.Upload.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../../../www/bower_components/qunit/qunit/qunit.css"/>
|
||||
<script> $(document).ready(function(){
|
||||
|
||||
var getUploadManager = function(){
|
||||
|
@@ -3,13 +3,13 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Mocha Spec Runner</title>
|
||||
<link rel="stylesheet" href="../../assets//mocha/mocha.css">
|
||||
<link rel="stylesheet" href="../../bower_components/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../../assets/mocha/mocha.js"></script>
|
||||
<script src="../../assets/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/requirejs/require.js"></script>
|
||||
<script src="../../bower_components/mocha/mocha.js"></script>
|
||||
<script src="../../bower_components/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/vendors/requirejs/require.js"></script>
|
||||
<script src="common.js"></script>
|
||||
<script type="text/javascript">
|
||||
mocha.setup({
|
||||
|
@@ -1,23 +1,36 @@
|
||||
require.config({
|
||||
baseUrl: "../../scripts",
|
||||
paths: {
|
||||
"chai" : "../assets/chai/chai",
|
||||
"fixtures": "../assets/js-fixtures/fixtures",
|
||||
"jquery": "../assets/jquery/jquery",
|
||||
"backbone": "../assets/backbone-amd/backbone",
|
||||
"i18n": "../assets/i18next/i18next.amd-1.6.3",
|
||||
"bootstrap": "../assets/bootstrap/js/bootstrap.min",
|
||||
"sinonchai": "../assets/sinon-chai/sinon-chai",
|
||||
"squire": "../assets/squire/Squire",
|
||||
"jquery.ui": "../assets/jquery.ui/jquery-ui",
|
||||
"underscore": "../assets/underscore-amd/underscore",
|
||||
"jquery.ui.widget": "../assets/jquery-file-upload/jquery.ui.widget",
|
||||
"jquery.cookie": "../assets/jquery.cookie/jquery.cookie",
|
||||
"chai" : "../bower_components/chai/chai",
|
||||
"fixtures": "../bower_components/js-fixtures/fixtures",
|
||||
jquery: "../assets/vendors/jquery/jquery.min",
|
||||
underscore: "../assets/vendors/underscore/underscore.min",
|
||||
backbone: "../assets/vendors/backbone/backbone.min",
|
||||
i18n: "../assets/vendors/i18next/i18next.min",
|
||||
bootstrap: "../assets/vendors/bootstrap/js/bootstrap.min",
|
||||
"sinonchai": "../bower_components/sinon-chai/lib/sinon-chai",
|
||||
"squire": "../bower_components/squire/src/Squire",
|
||||
"jquery.ui": "../assets/vendors/jquery-ui/jquery-ui.min",
|
||||
"jquery.ui.widget": "../assets/vendors/jquery-file-upload/jquery.ui.widget.min",
|
||||
"jquery.cookie": "../assets/vendors/jquery.cookie/jquery.cookie.min",
|
||||
"jquery.treeview": "../assets/vendors/jquery-treeview/jquery.treeview",
|
||||
"jquery.tooltip": "../include/jquery.tooltip",
|
||||
"blueimp.loadimage" : "../assets/blueimp-load-image/load-image",
|
||||
"jfu.iframe-transport": "../assets/jquery-file-upload/jquery.iframe-transport",
|
||||
"jfu.fileupload": "../assets/jquery-file-upload/jquery.fileupload"
|
||||
//"jquery.tooltip": "../include/jquery.tooltip",
|
||||
"blueimp.loadimage" : "../assets/vendors/blueimp-load-image/load-image",
|
||||
"jfu.iframe-transport": "../assets/vendors/jquery-file-upload/jquery.iframe-transport",
|
||||
"jfu.fileupload": "../assets/vendors/jquery-file-upload/jquery.fileupload",
|
||||
|
||||
|
||||
//"jquery.geonames": "../assets/vendors/jquery.geonames/jquery.geonames",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//"jquery.tooltip": "../include/jquery.tooltip",
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
shim: {
|
||||
"jquery.ui": {
|
||||
@@ -34,13 +47,10 @@ require.config({
|
||||
deps: ["jquery"],
|
||||
exports: '$.fn.cookie'
|
||||
},
|
||||
"jquery.tooltip": {
|
||||
/*"jquery.tooltip": {
|
||||
deps: ["jquery"],
|
||||
exports: '$.fn.tooltip'
|
||||
},
|
||||
"jquery.ui": {
|
||||
deps: ["jquery"]
|
||||
},
|
||||
},*/
|
||||
"jquery.ui.widget": {
|
||||
deps: ["jquery"]
|
||||
},
|
||||
|
@@ -3,13 +3,13 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Mocha Spec Runner</title>
|
||||
<link rel="stylesheet" href="../../assets/mocha/mocha.css">
|
||||
<link rel="stylesheet" href="../../bower_components/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../../assets/mocha/mocha.js"></script>
|
||||
<script src="../../assets/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/requirejs/require.js"></script>
|
||||
<script src="../../bower_components/mocha/mocha.js"></script>
|
||||
<script src="../../bower_components/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/vendors/requirejs/require.js"></script>
|
||||
<script src="common.js"></script>
|
||||
<script>
|
||||
mocha.setup({
|
||||
|
@@ -3,13 +3,13 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Mocha Spec Runner</title>
|
||||
<link rel="stylesheet" href="../../assets/mocha/mocha.css">
|
||||
<link rel="stylesheet" href="../../bower_components/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../../assets/mocha/mocha.js"></script>
|
||||
<script src="../../assets/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/requirejs/require.js"></script>
|
||||
<script src="../../bower_components/mocha/mocha.js"></script>
|
||||
<script src="../../bower_components/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/vendors/requirejs/require.js"></script>
|
||||
<script src="common.js"></script>
|
||||
<script>
|
||||
mocha.setup({
|
||||
|
@@ -3,13 +3,13 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Mocha Spec Runner</title>
|
||||
<link rel="stylesheet" href="../../assets/mocha/mocha.css">
|
||||
<link rel="stylesheet" href="../../bower_components/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../../assets/mocha/mocha.js"></script>
|
||||
<script src="../../assets/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/requirejs/require.js"></script>
|
||||
<script src="../../bower_components/mocha/mocha.js"></script>
|
||||
<script src="../../bower_components/sinonjs/sinon.js"></script>
|
||||
<script src="../../assets/vendors/requirejs/require.js"></script>
|
||||
<script src="common.js"></script>
|
||||
<script>
|
||||
mocha.setup({
|
||||
|
Reference in New Issue
Block a user