Merge branch 'master' into ingest/pipelineIngestAPI
This commit is contained in:
commit
459338e0fa
45 changed files with 350 additions and 114 deletions
|
@ -1,12 +1,12 @@
|
|||
[[setup-repositories]]
|
||||
=== Kibana Repositories
|
||||
|
||||
Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools.We also have
|
||||
repositories available for APT and YUM based distributions.
|
||||
Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools.We also have
|
||||
repositories available for APT and YUM based distributions.
|
||||
|
||||
NOTE: Since the packages are created as part of the Kibana build, source packages are not available.
|
||||
|
||||
Packages are signed with the PGP key http://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4], which
|
||||
Packages are signed with the PGP key http://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4], which
|
||||
has the following fingerprint:
|
||||
|
||||
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
|
||||
|
@ -31,7 +31,7 @@ echo "deb http://packages.elastic.co/kibana/{branch}/debian stable main" | sudo
|
|||
+
|
||||
[WARNING]
|
||||
==================================================
|
||||
Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command
|
||||
Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command
|
||||
adds a `deb-src` entry with no corresponding source package.
|
||||
When the `deb-src` entry, is present, the commands in this procedure generate an error similar to the following:
|
||||
|
||||
|
@ -47,7 +47,7 @@ Delete the `deb-src` entry from the `/etc/apt/sources.list` file to clear the er
|
|||
sudo apt-get update && sudo apt-get install kibana
|
||||
--------------------------------------------------
|
||||
+
|
||||
. Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`,
|
||||
. Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`,
|
||||
run the following command:
|
||||
+
|
||||
[source,sh]
|
||||
|
@ -67,7 +67,7 @@ sudo /bin/systemctl enable kibana.service
|
|||
[[kibana-yum]]
|
||||
===== Installing Kibana with yum
|
||||
|
||||
WARNING: The repositories set up in this procedure are not compatible with distributions using version 3 of `rpm`, such
|
||||
WARNING: The repositories set up in this procedure are not compatible with distributions using version 3 of `rpm`, such
|
||||
as CentOS version 5.
|
||||
|
||||
. Download and install the public signing key:
|
||||
|
@ -96,8 +96,8 @@ enabled=1
|
|||
yum install kibana
|
||||
--------------------------------------------------
|
||||
+
|
||||
Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`,
|
||||
run the following command:
|
||||
Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`
|
||||
(check with `ps -p 1`), run the following command:
|
||||
+
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
"elasticsearchWithPlugins": "grunt esvm:withPlugins:keepalive",
|
||||
"lint": "grunt eslint:source",
|
||||
"lintroller": "grunt eslint:fixSource",
|
||||
"mocha": "mocha --compilers js:babel/register",
|
||||
"mocha:debug": "mocha --debug-brk --compilers js:babel/register"
|
||||
"mocha": "mocha",
|
||||
"mocha:debug": "mocha --debug-brk"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -142,7 +142,7 @@
|
|||
"Nonsense": "0.1.2",
|
||||
"angular-mocks": "1.4.7",
|
||||
"auto-release-sinon": "1.0.3",
|
||||
"babel-eslint": "4.1.3",
|
||||
"babel-eslint": "4.1.7",
|
||||
"chokidar": "1.0.5",
|
||||
"eslint": "1.5.1",
|
||||
"eslint-plugin-mocha": "1.0.0",
|
||||
|
|
|
@ -2,15 +2,21 @@ const _ = require('lodash');
|
|||
const Promise = require('bluebird');
|
||||
const Boom = require('boom');
|
||||
const getBasicAuthRealm = require('./get_basic_auth_realm');
|
||||
const toPath = require('lodash/internal/toPath');
|
||||
|
||||
module.exports = (client) => {
|
||||
return (req, endpoint, params = {}) => {
|
||||
if (req.headers.authorization) {
|
||||
_.set(params, 'headers.authorization', req.headers.authorization);
|
||||
}
|
||||
const api = _.get(client, endpoint);
|
||||
const path = toPath(endpoint);
|
||||
const api = _.get(client, path);
|
||||
let apiContext = _.get(client, path.slice(0, -1));
|
||||
if (_.isEmpty(apiContext)) {
|
||||
apiContext = client;
|
||||
}
|
||||
if (!api) throw new Error(`callWithRequest called with an invalid endpoint: ${endpoint}`);
|
||||
return api.call(client, params)
|
||||
return api.call(apiContext, params)
|
||||
.catch((err) => {
|
||||
if (err.status === 401) {
|
||||
// TODO: The err.message is temporary until we have support for getting headers in the client.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<kbn-agg-table
|
||||
table="table"
|
||||
export-title="vis.title"
|
||||
per-page="editableVis.params.spyPerPage">
|
||||
per-page="spy.params.spyPerPage">
|
||||
</kbn-agg-table>
|
||||
|
|
|
@ -21,8 +21,8 @@ define(function (require) {
|
|||
if (!$scope.vis || !$scope.esResp) {
|
||||
$scope.table = null;
|
||||
} else {
|
||||
if (!$scope.editableVis.params.spyPerPage) {
|
||||
$scope.editableVis.params.spyPerPage = PER_PAGE_DEFAULT;
|
||||
if (!$scope.spy.params.spyPerPage) {
|
||||
$scope.spy.params.spyPerPage = PER_PAGE_DEFAULT;
|
||||
}
|
||||
|
||||
$scope.table = tabifyAggResponse($scope.vis, $scope.esResp, {
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = (kibana) => {
|
|||
},
|
||||
|
||||
uiExports: {
|
||||
bundle: async (UiBundle, env, apps) => {
|
||||
bundle: async (UiBundle, env, apps, plugins) => {
|
||||
let modules = [];
|
||||
let config = kibana.config;
|
||||
|
||||
|
@ -23,10 +23,15 @@ module.exports = (kibana) => {
|
|||
modules = union(modules, app.getModules());
|
||||
}
|
||||
|
||||
let testFiles = await findSourceFiles([
|
||||
'src/**/public/**/__tests__/**/*.js',
|
||||
'installedPlugins/*/public/**/__tests__/**/*.js'
|
||||
]);
|
||||
const testGlobs = [
|
||||
'src/ui/public/**/__tests__/**/*.js',
|
||||
];
|
||||
|
||||
for (const plugin of plugins) {
|
||||
testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`);
|
||||
}
|
||||
|
||||
const testFiles = await findSourceFiles(testGlobs);
|
||||
|
||||
for (let f of testFiles) modules.push(f);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
let _ = require('lodash');
|
||||
let Joi = require('joi');
|
||||
let { attempt, fromNode } = require('bluebird');
|
||||
let { resolve } = require('path');
|
||||
let { basename, resolve } = require('path');
|
||||
let { inherits } = require('util');
|
||||
|
||||
const defaultConfigSchema = Joi.object({
|
||||
|
@ -18,11 +18,23 @@ module.exports = class Plugin {
|
|||
this.uiExportsSpecs = opts.uiExports || {};
|
||||
this.requiredIds = opts.require || [];
|
||||
this.version = opts.version || pkg.version;
|
||||
this.publicDir = opts.publicDir !== false ? resolve(path, 'public') : null;
|
||||
this.externalCondition = opts.initCondition || _.constant(true);
|
||||
this.externalInit = opts.init || _.noop;
|
||||
this.getConfigSchema = opts.config || _.noop;
|
||||
this.init = _.once(this.init);
|
||||
|
||||
if (opts.publicDir === false) {
|
||||
this.publicDir = null;
|
||||
}
|
||||
else if (!opts.publicDir) {
|
||||
this.publicDir = resolve(this.path, 'public');
|
||||
}
|
||||
else {
|
||||
this.publicDir = opts.publicDir;
|
||||
if (basename(this.publicDir) !== 'public') {
|
||||
throw new Error(`publicDir for plugin ${this.id} must end with a "public" directory.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static scoped(kbnServer, path, pkg) {
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = async (kbnServer, server, config) => {
|
|||
}
|
||||
|
||||
for (let gen of uiExports.getBundleProviders()) {
|
||||
let bundle = await gen(UiBundle, bundlerEnv, uiExports.getAllApps());
|
||||
let bundle = await gen(UiBundle, bundlerEnv, uiExports.getAllApps(), kbnServer.plugins);
|
||||
if (bundle) bundles.add(bundle);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ define(function (require) {
|
|||
var $container = $el.find('.visualize-spy-container');
|
||||
var fullPageSpy = _.get($scope.spy, 'mode.fill', false);
|
||||
$scope.modes = spyModes;
|
||||
$scope.spy.params = $scope.spy.params || {};
|
||||
|
||||
function getSpyObject(name) {
|
||||
name = _.isUndefined(name) ? $scope.spy.mode.name : name;
|
||||
|
|
|
@ -37,7 +37,7 @@ module.exports = function (grunt) {
|
|||
// use an async iife to store promise for download
|
||||
// then store platform in active downloads list
|
||||
// which we will read from in the finish task
|
||||
platform.downloadPromise = (async () => {
|
||||
platform.downloadPromise = (async function () {
|
||||
grunt.file.mkdir(downloadDir);
|
||||
|
||||
if (platform.name === 'windows') {
|
||||
|
@ -82,4 +82,3 @@ module.exports = function (grunt) {
|
|||
.nodeify(this.async());
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,31 +1,33 @@
|
|||
module.exports = function (grunt) {
|
||||
let { flatten } = require('lodash');
|
||||
|
||||
grunt.registerTask('build', flatten([
|
||||
'_build:getProps',
|
||||
'clean:build',
|
||||
'clean:target',
|
||||
'_build:downloadNodeBuilds:start',
|
||||
'copy:devSource',
|
||||
'babel:build',
|
||||
'_build:babelOptions',
|
||||
'_build:installedPlugins',
|
||||
'_build:packageJson',
|
||||
'_build:readme',
|
||||
'_build:installNpmDeps',
|
||||
'_build:removePkgJsonDeps',
|
||||
'clean:testsFromModules',
|
||||
'clean:deepModuleBins',
|
||||
'clean:deepModules',
|
||||
'run:optimizeBuild',
|
||||
'stop:optimizeBuild',
|
||||
'_build:downloadNodeBuilds:finish',
|
||||
'_build:versionedLinks',
|
||||
'_build:archives',
|
||||
!grunt.option('os-packages') ? [] : [
|
||||
'_build:pleaseRun',
|
||||
'_build:osPackages',
|
||||
],
|
||||
'_build:shasums'
|
||||
]));
|
||||
grunt.registerTask('build', 'Build packages', function (arg) {
|
||||
grunt.task.run(flatten([
|
||||
'_build:getProps',
|
||||
'clean:build',
|
||||
'clean:target',
|
||||
'_build:downloadNodeBuilds:start',
|
||||
'copy:devSource',
|
||||
'babel:build',
|
||||
'_build:babelOptions',
|
||||
'_build:installedPlugins',
|
||||
'_build:packageJson',
|
||||
'_build:readme',
|
||||
'_build:installNpmDeps',
|
||||
'_build:removePkgJsonDeps',
|
||||
'clean:testsFromModules',
|
||||
'clean:deepModuleBins',
|
||||
'clean:deepModules',
|
||||
'run:optimizeBuild',
|
||||
'stop:optimizeBuild',
|
||||
'_build:downloadNodeBuilds:finish',
|
||||
'_build:versionedLinks',
|
||||
'_build:archives',
|
||||
(grunt.option('os-packages') || arg === 'ospackages') ? [
|
||||
'_build:pleaseRun',
|
||||
'_build:osPackages',
|
||||
] : [],
|
||||
'_build:shasums'
|
||||
]));
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require('../../test/mocha_setup');
|
||||
|
||||
module.exports = {
|
||||
options: {
|
||||
timeout: 10000,
|
||||
|
|
|
@ -3,7 +3,7 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.registerTask('jenkins', 'Jenkins build script', compact([
|
||||
'test',
|
||||
process.env.JOB_NAME === 'kibana_core' ? 'build' : null
|
||||
process.env.JOB_NAME === 'kibana_core' ? 'build:ospackages' : null
|
||||
]));
|
||||
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ var expect = require('expect.js');
|
|||
var sinon = require('sinon');
|
||||
var Promise = require('bluebird');
|
||||
|
||||
var ScenarioManager = require('../scenarioManager');
|
||||
var ScenarioManager = require('../scenario_manager');
|
||||
|
||||
describe('scenario manager', function () {
|
||||
var manager = new ScenarioManager('http://localhost:9200');
|
128
test/functional/apps/discover/_collapse_expand.js
Normal file
128
test/functional/apps/discover/_collapse_expand.js
Normal file
|
@ -0,0 +1,128 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
bdd.describe('discover tab', function describeIndexTests() {
|
||||
var common;
|
||||
var headerPage;
|
||||
var settingsPage;
|
||||
var discoverPage;
|
||||
var baseUrl;
|
||||
|
||||
bdd.before(function () {
|
||||
common = new Common(this.remote);
|
||||
headerPage = new HeaderPage(this.remote);
|
||||
settingsPage = new SettingsPage(this.remote);
|
||||
discoverPage = new DiscoverPage(this.remote);
|
||||
|
||||
baseUrl = common.getHostPort();
|
||||
|
||||
var fromTime = '2015-09-19 06:31:44.000';
|
||||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
// start each test with an empty kibana index
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
// and load a set of makelogs data
|
||||
.then(function loadIfEmptyMakelogs() {
|
||||
return scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
})
|
||||
.then(function (navigateTo) {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('discover');
|
||||
return common.navigateToApp('discover');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('setAbsoluteRange');
|
||||
return headerPage.setAbsoluteRange(fromTime, toTime);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
|
||||
bdd.describe('legend', function () {
|
||||
|
||||
bdd.it('should initially be collapsed', function () {
|
||||
return discoverPage.getLegendWidth()
|
||||
.then(function (actualwidth) {
|
||||
common.debug('collapsed legend width = ' + actualwidth);
|
||||
expect(actualwidth < 20).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should expand when clicked', function () {
|
||||
return discoverPage.clickLegendExpand()
|
||||
.then(function () {
|
||||
return discoverPage.getLegendWidth();
|
||||
})
|
||||
.then(function (actualwidth) {
|
||||
common.debug('expanded legend width = ' + actualwidth);
|
||||
expect(actualwidth > 140).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should collapse when clicked', function () {
|
||||
return discoverPage.clickLegendCollapse()
|
||||
.then(function () {
|
||||
return discoverPage.getLegendWidth();
|
||||
})
|
||||
.then(function (actualwidth) {
|
||||
expect(actualwidth < 20).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
bdd.describe('field data', function () {
|
||||
|
||||
bdd.it('should initially be expanded', function () {
|
||||
return discoverPage.getSidebarWidth()
|
||||
.then(function (actualwidth) {
|
||||
common.debug('expanded sidebar width = ' + actualwidth);
|
||||
expect(actualwidth > 180).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should collapse when clicked', function () {
|
||||
return discoverPage.clickSidebarCollapse()
|
||||
.then(function () {
|
||||
return discoverPage.getSidebarWidth();
|
||||
})
|
||||
.then(function (actualwidth) {
|
||||
common.debug('collapsed sidebar width = ' + actualwidth);
|
||||
expect(actualwidth < 20).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should expand when clicked', function () {
|
||||
return discoverPage.clickSidebarExpand()
|
||||
.then(function () {
|
||||
return discoverPage.getSidebarWidth();
|
||||
})
|
||||
.then(function (actualwidth) {
|
||||
common.debug('expanded sidebar width = ' + actualwidth);
|
||||
expect(actualwidth > 180).to.be(true);
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
});
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -2,10 +2,11 @@ define(function (require) {
|
|||
var bdd = require('intern!bdd');
|
||||
var config = require('intern').config;
|
||||
var url = require('intern/dojo/node!url');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager');
|
||||
var discoverTest = require('./_discover');
|
||||
var fieldData = require('./_field_data');
|
||||
var sharedLinks = require('./_shared_links');
|
||||
var collapseExpand = require('./_collapse_expand');
|
||||
|
||||
bdd.describe('discover app', function () {
|
||||
var scenarioManager;
|
||||
|
@ -28,5 +29,7 @@ define(function (require) {
|
|||
|
||||
sharedLinks(bdd, scenarioManager);
|
||||
|
||||
collapseExpand(bdd, scenarioManager);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
var config = require('intern').config;
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
var bdd = require('intern!bdd');
|
||||
var config = require('intern').config;
|
||||
var url = require('intern/dojo/node!url');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager');
|
||||
|
||||
var initialStateTest = require('./_initial_state');
|
||||
var creationChangesTest = require('./_creation_form_changes');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(function (require) {
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
var DiscoverPage = require('../../../support/pages/DiscoverPage');
|
||||
var VisualizePage = require('../../../support/pages/VisualizePage');
|
||||
var DiscoverPage = require('../../../support/pages/discover_page');
|
||||
var VisualizePage = require('../../../support/pages/visualize_page');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
|
||||
return function (bdd, scenarioManager) {
|
||||
|
|
|
@ -4,9 +4,9 @@ define(function (require) {
|
|||
var config = require('intern').config;
|
||||
var url = require('intern/dojo/node!url');
|
||||
var _ = require('intern/dojo/node!lodash');
|
||||
var Common = require('../../../support/pages/Common');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager');
|
||||
var HeaderPage = require('../../../support/pages/HeaderPage');
|
||||
var Common = require('../../../support/pages/common');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager');
|
||||
var HeaderPage = require('../../../support/pages/header_page');
|
||||
var SettingsPage = require('../../../support/pages/settings_page');
|
||||
|
||||
var chartTypeTest = require('./_chart_types');
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
var bdd = require('intern!bdd');
|
||||
var expect = require('intern/dojo/node!expect.js');
|
||||
var config = require('intern').config;
|
||||
var Common = require('../../support/pages/Common');
|
||||
var Common = require('../../support/pages/common');
|
||||
|
||||
bdd.describe('status page', function () {
|
||||
var common;
|
||||
|
|
1
test/mocha.opts
Normal file
1
test/mocha.opts
Normal file
|
@ -0,0 +1 @@
|
|||
--require test/mocha_setup.js
|
41
test/mocha_setup.js
Normal file
41
test/mocha_setup.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
var sinon = require('sinon');
|
||||
var autoRelease = require('auto-release-sinon');
|
||||
|
||||
require('babel/register')(require('../src/optimize/babelOptions').node);
|
||||
|
||||
// hook into the global afterEach variable to allow autoReleaseSinon to register
|
||||
// an afterEach handler before mocha has exposed itself to the test files.
|
||||
//
|
||||
// This works by telling autoReleaseSinon to use a fake "afterEach" function.
|
||||
// Rather than actually record an afterEach handler the function tracks all of
|
||||
// the calls it received and queues them up in queuedAfterEachArgs.
|
||||
//
|
||||
// The global "afterEach" variable is also tracked, and once it is assigned by mocha
|
||||
// the variable global is reconfigured to point directly to the new value (from mocha)
|
||||
// and all of the queued invocations are executed.
|
||||
var queuedAfterEachArgs = [];
|
||||
Object.defineProperty(global, 'afterEach', {
|
||||
configurable: true,
|
||||
get() { return undefined; },
|
||||
set(afterEach) {
|
||||
Object.defineProperty(global, 'afterEach', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: afterEach
|
||||
});
|
||||
|
||||
queuedAfterEachArgs.forEach(function (args) {
|
||||
afterEach.apply(null, args);
|
||||
});
|
||||
|
||||
return global.afterEach;
|
||||
}
|
||||
});
|
||||
|
||||
autoRelease.setupAutoRelease(sinon, function () {
|
||||
if (!global.afterEach) {
|
||||
queuedAfterEachArgs.push(Array.prototype.slice.call(arguments));
|
||||
} else {
|
||||
global.afterEach.apply(this, arguments);
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
// in test/support/pages/Common.js
|
||||
// in test/support/pages/common.js
|
||||
define(function (require) {
|
||||
var config = require('intern').config;
|
||||
var Promise = require('bluebird');
|
|
@ -1,7 +1,7 @@
|
|||
// in test/support/pages/DiscoverPage.js
|
||||
// in test/support/pages/discover_page.js
|
||||
define(function (require) {
|
||||
var config = require('intern').config;
|
||||
var Common = require('./Common');
|
||||
var Common = require('./common');
|
||||
|
||||
var defaultTimeout = config.timeouts.default;
|
||||
var common;
|
||||
|
@ -211,6 +211,42 @@ define(function (require) {
|
|||
return thisTime
|
||||
.findByCssSelector('.url')
|
||||
.getProperty('value');
|
||||
},
|
||||
|
||||
clickLegendExpand: function clickLegendExpand() {
|
||||
return thisTime
|
||||
.findByCssSelector('.fa-chevron-left')
|
||||
.click();
|
||||
},
|
||||
|
||||
clickLegendCollapse: function clickLegendCollapse() {
|
||||
return thisTime
|
||||
.findByCssSelector('div.legend-toggle > i.fa-chevron-right')
|
||||
.click();
|
||||
},
|
||||
|
||||
getLegendWidth: function getLegendWidth() {
|
||||
return thisTime
|
||||
.findByCssSelector('.legend-col-wrapper')
|
||||
.getProperty('clientWidth');
|
||||
},
|
||||
|
||||
clickSidebarExpand: function clickSidebarExpand() {
|
||||
return thisTime
|
||||
.findByCssSelector('.chevron-cont')
|
||||
.click();
|
||||
},
|
||||
|
||||
clickSidebarCollapse: function clickSidebarCollapse() {
|
||||
return thisTime
|
||||
.findByCssSelector('.chevron-cont')
|
||||
.click();
|
||||
},
|
||||
|
||||
getSidebarWidth: function getSidebarWidth() {
|
||||
return thisTime
|
||||
.findByCssSelector('.sidebar-list')
|
||||
.getProperty('clientWidth');
|
||||
}
|
||||
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
// in test/support/pages/HeaderPage.js
|
||||
// in test/support/pages/header_page.js
|
||||
define(function (require) {
|
||||
var config = require('intern').config;
|
||||
var Common = require('./Common');
|
||||
var Common = require('./common');
|
||||
|
||||
var common;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
define(function (require) {
|
||||
var config = require('intern').config;
|
||||
var Promise = require('bluebird');
|
||||
var Common = require('./Common');
|
||||
var Common = require('./common');
|
||||
|
||||
var defaultTimeout = config.timeouts.default;
|
||||
var common;
|
||||
|
|
|
@ -2,7 +2,7 @@ define(function (require) {
|
|||
|
||||
var config = require('intern').config;
|
||||
var registerSuite = require('intern!object');
|
||||
var Common = require('./Common');
|
||||
var Common = require('./common');
|
||||
|
||||
var defaultTimeout = config.timeouts.default;
|
||||
var common;
|
|
@ -1,7 +1,7 @@
|
|||
define(function (require) {
|
||||
var bdd = require('intern!bdd');
|
||||
var serverConfig = require('intern/dojo/node!../../../serverConfig');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager');
|
||||
var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager');
|
||||
var request = require('intern/dojo/node!supertest-as-promised');
|
||||
var url = require('intern/dojo/node!url');
|
||||
var _ = require('intern/dojo/node!lodash');
|
||||
|
|
Loading…
Reference in a new issue