mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Update qunit and sinon
This commit is contained in:
@@ -242,7 +242,7 @@ MetricsLogger.prototype._postCache = function _postCache( options ){
|
||||
self._postSize = self.options.maxCacheSize;
|
||||
//TODO:??
|
||||
// log this failure to explain any gap in metrics
|
||||
this.emit( 'error', 'MetricsLogger', [ '_postCache error:',
|
||||
self.emit( 'error', 'MetricsLogger', [ '_postCache error:',
|
||||
xhr.readyState, xhr.status, xhr.responseJSON || xhr.responseText ]);
|
||||
//TODO: still doesn't solve the problem that when cache == max, post will be tried on every emit
|
||||
//TODO: see _delayPost
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -10,8 +10,8 @@ require.config({
|
||||
"jquery": "libs/jquery/jquery",
|
||||
"backbone": "libs/backbone",
|
||||
// Custom paths for qunit testing dependencies...
|
||||
"QUnit": qunit_absolute_directory + "test-libs/qunit-1.14.0", // .. because baseUrl is scripts to match Galaxy.
|
||||
"sinon": qunit_absolute_directory + "test-libs/sinon-1.9.1",
|
||||
"QUnit": qunit_absolute_directory + "test-libs/qunit-1.23.1", // .. because baseUrl is scripts to match Galaxy.
|
||||
"sinon": qunit_absolute_directory + "test-libs/sinon-1.17.3",
|
||||
"sinon-qunit": qunit_absolute_directory + "test-libs/sinon-qunit-1.0.0",
|
||||
// (optional) test data
|
||||
"test-data" : qunit_absolute_directory + "test-data/",
|
||||
@@ -57,7 +57,7 @@ var Galaxy = {
|
||||
require( [ "jquery", "QUnit" ], function( $, QUnit ) {
|
||||
// Bootstrap HTML for displaying Qunit results.
|
||||
$('head').append( $('<link rel="stylesheet" type="text/css" />')
|
||||
.attr( "href", qunit_absolute_directory + "test-libs/qunit-1.14.0.css") );
|
||||
.attr( "href", qunit_absolute_directory + "test-libs/qunit-1.23.1.css") );
|
||||
$('body').append( $('<div id="qunit">') );
|
||||
$('body').append( $('<div id="qunit-fixture">') );
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,27 +1,27 @@
|
||||
/*!
|
||||
* QUnit 1.14.0
|
||||
* http://qunitjs.com/
|
||||
* QUnit 1.23.1
|
||||
* https://qunitjs.com/
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2014-01-31T16:40Z
|
||||
* Date: 2016-04-12T17:29Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -62,14 +62,20 @@
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-filteredTest {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
background-color: #F4FF77;
|
||||
color: #366097;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
background-color: #2B81AF;
|
||||
color: #FFF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
@@ -77,6 +83,18 @@
|
||||
|
||||
#qunit-modulefilter-container {
|
||||
float: right;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
.qunit-url-config {
|
||||
display: inline-block;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
.qunit-filter {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
@@ -86,24 +104,55 @@
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
padding: 0.4em 1em 0.4em 1em;
|
||||
border-bottom: 1px solid #FFF;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
||||
#qunit-tests > li {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li.running,
|
||||
#qunit-tests li.pass,
|
||||
#qunit-tests li.fail,
|
||||
#qunit-tests li.skipped {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li.skipped strong {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
@@ -123,6 +172,10 @@
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-source {
|
||||
margin: 0.6em 0 0.3em;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
@@ -211,11 +264,26 @@
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
/*** Skipped tests */
|
||||
|
||||
#qunit-tests .skipped {
|
||||
background-color: #EBECE9;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-skipped-label {
|
||||
background-color: #F4FF77;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
color: #366097;
|
||||
line-height: 1.8em;
|
||||
padding: 0 0.5em;
|
||||
margin: -0.4em 0.4em -0.4em 0;
|
||||
}
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
@@ -234,4 +302,4 @@
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -54,12 +54,12 @@ define([
|
||||
self.clear = function(){
|
||||
self._storage = {};
|
||||
};
|
||||
// property - not worth it
|
||||
//self.length = function(){};
|
||||
|
||||
return self;
|
||||
};
|
||||
window.localStorage = new MockLocalStorage();
|
||||
var mockStorage = new MockLocalStorage();
|
||||
window.localStorage.__proto__.setItem = mockStorage.setItem;
|
||||
window.localStorage.__proto__.getItem = mockStorage.getItem;
|
||||
window.localStorage.__proto__.removeItem = mockStorage.removeItem;
|
||||
|
||||
( window.bootstrapped = {} ).user = {
|
||||
id : 'test'
|
||||
@@ -235,7 +235,7 @@ define([
|
||||
equal( logger.consoleLogger.constructor, MockConsole );
|
||||
|
||||
logger.emit( 'debug', 'test', [ 1, 2, { three: 3 }] );
|
||||
equal( logger.cache.length(), 0 );
|
||||
equal( logger.cache.length(), 1 );
|
||||
//console.debug( JSON.stringify( mockConsole.lastMessage ) );
|
||||
equal( mockConsole.lastMessage.level, 'debug' );
|
||||
equal( mockConsole.lastMessage.args.length, 4 );
|
||||
|
||||
@@ -273,6 +273,7 @@ define([
|
||||
|
||||
module( "Input collection terminal model test", {
|
||||
setup: function( ) {
|
||||
testApp.create();
|
||||
this.node = new Node( create_app(), { } );
|
||||
this.input = { extensions: [ "txt" ], collection_types: ["list"] };
|
||||
this.input_terminal = new Terminals.InputCollectionTerminal( { input: this.input } );
|
||||
@@ -305,6 +306,7 @@ define([
|
||||
|
||||
module( "Node unit test", {
|
||||
setup: function() {
|
||||
testApp.create();
|
||||
this.input_terminal = { destroy: sinon.spy(), redraw: sinon.spy() };
|
||||
this.output_terminal = { destroy: sinon.spy(), redraw: sinon.spy() };
|
||||
this.app = create_app();
|
||||
|
||||
Reference in New Issue
Block a user