mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Use elasticdump to preload default index for visualization tests.
This commit is contained in:
parent
6ebe67d44b
commit
07e5686169
10 changed files with 54 additions and 190 deletions
|
@ -20,7 +20,11 @@ import {
|
|||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
common.debug('Starting dashboard before method');
|
||||
common.debug('navigateToApp dashboard');
|
||||
// Calling loadIfEmpty but not chaining the response. We can start the
|
||||
// testing before this finishes.
|
||||
// Loading this data takes about 10 seconds.
|
||||
// We don't actually check the data in these tests and they would pass without the data.
|
||||
scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
return esClient.delete('.kibana')
|
||||
.then(function () {
|
||||
return common.try(function () {
|
||||
|
@ -28,14 +32,15 @@ import {
|
|||
});
|
||||
})
|
||||
// and load a set of makelogs data
|
||||
.then(function loadkibana4() {
|
||||
.then(function loadkibanaVisualizations() {
|
||||
common.debug('load kibana index with visualizations');
|
||||
return elasticDump.elasticLoad('dashboard','.kibana');
|
||||
})
|
||||
// .then(function () {
|
||||
// return scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
// })
|
||||
.then(function () {
|
||||
return scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp dashboard');
|
||||
return common.navigateToApp('dashboard');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
|
|
|
@ -16,29 +16,8 @@ import {
|
|||
var fromTime = '2015-09-19 06:31:44.000';
|
||||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickAreaChart');
|
||||
return visualizePage.clickAreaChart();
|
||||
|
|
|
@ -11,23 +11,11 @@ import {
|
|||
|
||||
(function () {
|
||||
bdd.describe('visualize app', function describeIndexTests() {
|
||||
bdd.before(function () {
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.before(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
});
|
||||
|
||||
bdd.describe('chart types', function indexPatternCreation() {
|
||||
|
||||
|
|
|
@ -16,29 +16,8 @@ import {
|
|||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
bdd.before(function () {
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickDataTable');
|
||||
return visualizePage.clickDataTable();
|
||||
|
|
|
@ -16,29 +16,8 @@ import {
|
|||
var fromTime = '2015-09-19 06:31:44.000';
|
||||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickLineChart');
|
||||
return visualizePage.clickLineChart();
|
||||
|
|
|
@ -21,29 +21,8 @@ import {
|
|||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickMetric');
|
||||
return visualizePage.clickMetric();
|
||||
|
|
|
@ -16,29 +16,8 @@ import {
|
|||
var fromTime = '2015-09-19 06:31:44.000';
|
||||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickPieChart');
|
||||
return visualizePage.clickPieChart();
|
||||
|
|
|
@ -17,29 +17,8 @@ import {
|
|||
|
||||
bdd.before(function () {
|
||||
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickTileMap');
|
||||
return visualizePage.clickTileMap();
|
||||
|
|
|
@ -16,29 +16,8 @@ import {
|
|||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
bdd.before(function () {
|
||||
return scenarioManager.reload('emptyKibana')
|
||||
.then(function () {
|
||||
common.debug('navigateTo');
|
||||
return settingsPage.navigateTo();
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('createIndexPattern');
|
||||
return settingsPage.createIndexPattern();
|
||||
})
|
||||
.then(function () {
|
||||
return settingsPage.clickAdvancedTab();
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.debug('check for required UTC timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
expect(advancedSetting).to.be('UTC');
|
||||
})
|
||||
.then(function () {
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize');
|
||||
})
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
common.debug('clickVerticalBarChart');
|
||||
return visualizePage.clickVerticalBarChart();
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
import { bdd, remote, common, defaultTimeout, scenarioManager } from '../../../support';
|
||||
import {
|
||||
bdd,
|
||||
remote,
|
||||
common,
|
||||
defaultTimeout,
|
||||
scenarioManager,
|
||||
esClient,
|
||||
elasticDump
|
||||
} from '../../../support';
|
||||
|
||||
(function () {
|
||||
bdd.describe('visualize app', function () {
|
||||
|
@ -7,14 +15,24 @@ import { bdd, remote, common, defaultTimeout, scenarioManager } from '../../../s
|
|||
bdd.before(function () {
|
||||
var self = this;
|
||||
remote.setWindowSize(1200,800);
|
||||
// load a set of makelogs data
|
||||
common.debug('loadIfEmpty logstashFunctional ' + self.timeout);
|
||||
return scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
});
|
||||
|
||||
|
||||
bdd.after(function unloadMakelogs() {
|
||||
return scenarioManager.unload('logstashFunctional');
|
||||
common.debug('Starting visualize before method');
|
||||
// Calling loadIfEmpty but not chaining the response. We can start the
|
||||
// testing before this finishes.
|
||||
// The first test is _chart_types which does not require the data to be loaded.
|
||||
// Loading this data takes about 10 seconds.
|
||||
scenarioManager.loadIfEmpty('logstashFunctional');
|
||||
return esClient.delete('.kibana')
|
||||
.then(function () {
|
||||
return common.try(function () {
|
||||
return esClient.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'});
|
||||
});
|
||||
})
|
||||
.then(function loadkibanaIndexPattern() {
|
||||
common.debug('load kibana index with default index pattern');
|
||||
return elasticDump.elasticLoad('visualize','.kibana');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
require('./_chart_types');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue