Revert "Rename test:ui to test:browser so will run on Jenkins."
This reverts commit 5d9d695268
.
This commit is contained in:
parent
5d9d695268
commit
b7935865dc
2 changed files with 1 additions and 36 deletions
|
@ -15,8 +15,7 @@ module.exports = function (grunt) {
|
|||
'karma:dev'
|
||||
]);
|
||||
|
||||
// test:ui temporarily renamed
|
||||
grunt.registerTask('test:browser', [
|
||||
grunt.registerTask('test:ui', [
|
||||
'esvm:ui',
|
||||
'run:testUIServer',
|
||||
'downloadSelenium',
|
||||
|
|
|
@ -6,46 +6,12 @@ define(function (require) {
|
|||
var testSubjSelector = require('intern/dojo/node!@spalger/test-subj-selector');
|
||||
var getUrl = require('intern/dojo/node!../../utils/getUrl');
|
||||
var fs = require('intern/dojo/node!fs');
|
||||
var _ = require('intern/dojo/node!lodash');
|
||||
var parse = require('intern/dojo/node!url').parse;
|
||||
var format = require('intern/dojo/node!url').format;
|
||||
var path = require('intern/dojo/node!path');
|
||||
|
||||
function injectTimestampQuery(func, url) {
|
||||
var formatted = modifyQueryString(url, function (parsed) {
|
||||
parsed.query._t = Date.now();
|
||||
});
|
||||
return func.call(this, formatted);
|
||||
}
|
||||
|
||||
function removeTimestampQuery(func) {
|
||||
return func.call(this)
|
||||
.then(function (url) {
|
||||
return modifyQueryString(url, function (parsed) {
|
||||
parsed.query = _.omit(parsed.query, '_t');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function modifyQueryString(url, func) {
|
||||
var parsed = parse(url, true);
|
||||
if (parsed.query === null) {
|
||||
parsed.query = {};
|
||||
}
|
||||
func(parsed);
|
||||
return format(_.pick(parsed, 'protocol', 'hostname', 'port', 'pathname', 'query', 'hash', 'auth'));
|
||||
}
|
||||
|
||||
function Common(remote) {
|
||||
this.remote = remote;
|
||||
if (remote.get.wrapper !== injectTimestampQuery) {
|
||||
this.remote.get = _.wrap(this.remote.get, injectTimestampQuery);
|
||||
remote.get.wrapper = injectTimestampQuery;
|
||||
this.remote.getCurrentUrl = _.wrap(this.remote.getCurrentUrl, removeTimestampQuery);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var defaultTimeout = config.timeouts.default;
|
||||
|
||||
Common.prototype = {
|
||||
|
|
Loading…
Reference in a new issue