Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves functional tests for K5 redesign #6536

Merged
merged 1 commit into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/plugins/kibana/public/settings/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ kbn-settings-objects-view {
}

.advanced-settings {
overflow-x: scroll;

table {
width: 100%;

Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/visualize/visualize.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ visualize {
}

.vis-container {
height: 1px;
display: flex;
flex-direction: row;

flex: 1 1 auto;
flex: 1 0;
overflow: auto;
-webkit-transition: opacity 0.01s;
transition: opacity 0.01s;
Expand Down
48 changes: 25 additions & 23 deletions test/functional/apps/discover/_collapse_expand.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,37 @@ define(function (require) {

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));
.then(function (width) {
common.debug('expanded sidebar width = ' + width);
expect(width > 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));
return discoverPage.toggleSidebarCollapse()
.then(function () {
common.debug('discoverPage.getSidebarWidth()');
return discoverPage.getSidebarWidth();
})
.then(function (width) {
common.debug('collapsed sidebar width = ' + width);
expect(width < 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));
return discoverPage.toggleSidebarCollapse()
.then(function () {
common.debug('discoverPage.getSidebarWidth()');
return discoverPage.getSidebarWidth();
})
.then(function (width) {
common.debug('expanded sidebar width = ' + width);
expect(width > 180).to.be(true);
})
.catch(common.handleError(this));
});

});
Expand Down
80 changes: 34 additions & 46 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ define(function (require) {

bdd.it('load query should show query name', function () {
return discoverPage.loadSavedSearch(queryName1)
.then(function () {
return common.sleep(3000);
})
.then(function () {
return discoverPage.getCurrentQueryName();
})
Expand All @@ -104,18 +107,13 @@ define(function (require) {
.catch(common.handleError(this));
});



bdd.it('should show the correct bar chart', function () {
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0',
'2.7056249999999977', '14.771249999999995', '54.112500000000004',
'105.080625', '100.25437500000001', '54.916875', '13.747499999999988',
'2.266874999999999', '3.0712500000000063', '14.771249999999995',
'49.944374999999994', '99.523125', '103.471875', '51.699375',
'12.943124999999995', '1.9743749999999949', '2.3400000000000034',
'12.796875', '51.699375', '102.96000000000001', '99.08437500000001',
'53.08875', '14.698125000000005', '2.1206249999999898', '0', '0',
'0', '0', '0', '0', '0'
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0', '3.237',
'17.674', '64.75', '125.737', '119.962', '65.712', '16.449',
'2.712', '3.675', '17.674', '59.762', '119.087', '123.812',
'61.862', '15.487', '2.362', '2.800', '15.312', '61.862', '123.2',
'118.562', '63.524', '17.587', '2.537', '0', '0', '0', '0', '0',
'0', '0'
];
return common.sleep(4000)
.then(function () {
Expand Down Expand Up @@ -144,26 +142,19 @@ define(function (require) {

bdd.it('should show correct data for chart interval Hourly', function () {
var chartInterval = 'Hourly';
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '1.2763636363636266', '1.914545454545447',
'4.680000000000007', '6.594545454545454', '11.061818181818168', '25.314545454545453',
'38.50363636363636', '46.374545454545455', '72.53999999999999', '93.60000000000001',
'102.10909090909091', '109.97999999999999', '111.04363636363637', '94.87636363636364',
'85.72909090909091', '68.28545454545454', '54.88363636363636', '36.58909090909091',
'20.209090909090904', '11.700000000000003', '8.083636363636359', '5.105454545454549',
'0.6381818181818204', '0.8509090909090986', '2.3400000000000034', '2.978181818181824',
'3.61636363636363', '8.083636363636359', '10.423636363636362', '24.46363636363637',
'32.33454545454545', '45.94909090909091', '67.00909090909092', '85.51636363636365',
'94.87636363636364', '109.1290909090909', '110.61818181818181', '100.83272727272727',
'89.55818181818182', '65.30727272727273', '48.92727272727274', '36.16363636363636',
'21.059999999999988', '10.210909090909098', '6.38181818181819', '3.190909090909088',
'2.127272727272725', '0.4254545454545422', '1.701818181818183', '1.4890909090909048',
'3.61636363636363', '7.232727272727274', '7.870909090909095', '22.123636363636365',
'32.54727272727273', '51.267272727272726', '66.58363636363637', '85.94181818181818',
'104.66181818181818', '108.91636363636364', '107.00181818181818', '100.62',
'80.62363636363636', '62.32909090909091', '58.92545454545455', '33.18545454545455',
'21.059999999999988', '11.274545454545446', '10.423636363636362', '3.403636363636366',
'1.914545454545447', '0.8509090909090986', '0', '0', '0', '0', '0', '0',
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1.527', '2.290',
'5.599', '7.890', '13.236', '30.290', '46.072', '55.490', '86.8',
'112', '122.181', '131.6', '132.872', '113.527', '102.581',
'81.709', '65.672', '43.781', '24.181', '14', '9.672', '6.109',
'0.763', '1.018', '2.800', '3.563', '4.327', '9.672', '12.472',
'29.272', '38.690', '54.981', '80.181', '102.327', '113.527',
'130.581', '132.363', '120.654', '107.163', '78.145', '58.545',
'43.272', '25.199', '12.218', '7.636', '3.818', '2.545', '0.509',
'2.036', '1.781', '4.327', '8.654', '9.418', '26.472', '38.945',
'61.345', '79.672', '102.836', '125.236', '130.327', '128.036',
'120.4', '96.472', '74.581', '70.509', '39.709', '25.199', '13.490',
'12.472', '4.072', '2.290', '1.018', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'
];
return discoverPage.setChartInterval(chartInterval)
Expand All @@ -178,7 +169,9 @@ define(function (require) {

bdd.it('should show correct data for chart interval Daily', function () {
var chartInterval = 'Daily';
var expectedBarChartData = [ '0', '111.3138', '107.96759999999999', '108.4122', '0'];
var expectedBarChartData = [
'0', '133.196', '129.192', '129.724', '0'
];
return discoverPage.setChartInterval(chartInterval)
.then(function () {
return common.sleep(8000);
Expand All @@ -191,7 +184,7 @@ define(function (require) {

bdd.it('should show correct data for chart interval Weekly', function () {
var chartInterval = 'Weekly';
var expectedBarChartData = [ '55.6569', '108.1899'];
var expectedBarChartData = [ '66.598', '129.458'];
return discoverPage.setChartInterval(chartInterval)
.then(function () {
return common.sleep(2000);
Expand All @@ -204,7 +197,7 @@ define(function (require) {

bdd.it('should show correct data for chart interval Monthly', function () {
var chartInterval = 'Monthly';
var expectedBarChartData = [ '102.404'];
var expectedBarChartData = [ '122.535'];
return discoverPage.setChartInterval(chartInterval)
.then(function () {
return common.sleep(2000);
Expand All @@ -217,7 +210,7 @@ define(function (require) {

bdd.it('should show correct data for chart interval Yearly', function () {
var chartInterval = 'Yearly';
var expectedBarChartData = [ '102.404'];
var expectedBarChartData = [ '122.535'];
return discoverPage.setChartInterval(chartInterval)
.then(function () {
return common.sleep(2000);
Expand All @@ -228,19 +221,14 @@ define(function (require) {
.catch(common.handleError(this));
});



bdd.it('should show correct data for chart interval Auto', function () {
var chartInterval = 'Auto';
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0',
'2.7056249999999977', '14.771249999999995', '54.112500000000004',
'105.080625', '100.25437500000001', '54.916875', '13.747499999999988',
'2.266874999999999', '3.0712500000000063', '14.771249999999995',
'49.944374999999994', '99.523125', '103.471875', '51.699375',
'12.943124999999995', '1.9743749999999949', '2.3400000000000034',
'12.796875', '51.699375', '102.96000000000001', '99.08437500000001',
'53.08875', '14.698125000000005', '2.1206249999999898', '0', '0',
'0', '0', '0', '0', '0'
var expectedBarChartData = [ '0', '0', '0', '0', '0', '0', '3.237',
'17.674', '64.75', '125.737', '119.962', '65.712', '16.449',
'2.712', '3.675', '17.674', '59.762', '119.087', '123.812',
'61.862', '15.487', '2.362', '2.800', '15.312', '61.862', '123.2',
'118.562', '63.524', '17.587', '2.537', '0', '0', '0', '0', '0',
'0', '0'
];
return discoverPage.setChartInterval(chartInterval)
.then(function () {
Expand Down
1 change: 0 additions & 1 deletion test/functional/apps/discover/_field_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ define(function (require) {
var fromTimeString = 'September 19th 2015, 06:31:44.000';
var toTimeString = 'September 23rd 2015, 18:31:44.000';


bdd.it('search php should show the correct hit count', function () {
var expectedHitCount = '445';
return discoverPage.query('php')
Expand Down
8 changes: 4 additions & 4 deletions test/functional/apps/discover/_shared_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ define(function (require) {
var expectedUrl = baseUrl
+ '/app/kibana?_t=1453775307251#'
+ '/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time'
+ ':(from:%272015-09-19T06:31:44.000Z%27,mode:absolute,to:%272015-09'
+ '-23T18:31:44.000Z%27))&_a=(columns:!(_source),index:%27logstash-'
+ '*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query'
+ ':%27*%27)),sort:!(%27@timestamp%27,desc))';
+ ':(from:\'2015-09-19T06:31:44.000Z\',mode:absolute,to:\'2015-09'
+ '-23T18:31:44.000Z\'))&_a=(columns:!(_source),index:\'logstash-'
+ '*\',interval:auto,query:(query_string:(analyze_wildcard:!t,query'
+ ':\'*\')),sort:!(\'@timestamp\',desc))';
return discoverPage.getSharedUrl()
.then(function (actualUrl) {
// strip the timestamp out of each URL
Expand Down
26 changes: 13 additions & 13 deletions test/functional/apps/visualize/_metric_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ define(function (require) {
});

bdd.it('should show Standard Deviation', function pageHeader() {
var standardDeviationBytes = [ '-1,435.138', 'Lower Standard Deviation of bytes',
'5,727.314', 'Average of bytes', '12,889.766', 'Upper Standard Deviation of bytes'
var standardDeviationBytes = [
'-1,435.138', 'Lower Standard Deviation of bytes',
'5,727.314', 'Average of bytes',
'12,889.766', 'Upper Standard Deviation of bytes'
];
common.debug('Aggregation = Standard Deviation');
return visualizePage.selectAggregation('Standard Deviation')
Expand Down Expand Up @@ -252,18 +254,16 @@ define(function (require) {
});

bdd.it('should show Percentiles', function pageHeader() {
// This SHOULD be the expected result but the top item is cut off.
// See https://github.com/elastic/kibana/issues/5721
// var percentileMachineRam = ['2,147,483,648', '1st percentile of machine.ram', '3,221,225,472',
// '5th percentile of machine.ram', '7,516,192,768', '25th percentile of machine.ram', '12,884,901,888',
// '50th percentile of machine.ram', '18,253,611,008', '75th percentile of machine.ram',
// '32,212,254,720', '95th percentile of machine.ram', '32,212,254,720', '99th percentile of machine.ram'
// ];
var percentileMachineRam = ['3,221,225,472',
'5th percentile of machine.ram', '7,516,192,768', '25th percentile of machine.ram', '12,884,901,888',
'50th percentile of machine.ram', '18,253,611,008', '75th percentile of machine.ram',
'32,212,254,720', '95th percentile of machine.ram', '32,212,254,720', '99th percentile of machine.ram'
var percentileMachineRam = [
'2,147,483,648', '1st percentile of machine.ram',
'3,221,225,472', '5th percentile of machine.ram',
'7,516,192,768', '25th percentile of machine.ram',
'12,884,901,888', '50th percentile of machine.ram',
'18,253,611,008', '75th percentile of machine.ram',
'32,212,254,720', '95th percentile of machine.ram',
'32,212,254,720', '99th percentile of machine.ram'
];

common.debug('Aggregation = Percentiles');
return visualizePage.selectAggregation('Percentiles')
.then(function selectField() {
Expand Down
7 changes: 5 additions & 2 deletions test/support/pages/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ define(function (require) {
return self.remote.getCurrentUrl();
})
.then(function (currentUrl) {
var currentUrl = currentUrl.replace(/\/\/\w+:\w+@/, '//');
var navSuccessful = new RegExp(appUrl).test(currentUrl);
if (!navSuccessful) {
var msg = 'App failed to load: ' + appName +
Expand Down Expand Up @@ -254,8 +255,10 @@ define(function (require) {
},

findTestSubject: function findTestSubject(selector) {
this.debug('in findTestSubject: ' + selector);
return this.remote.findByCssSelector(testSubjSelector(selector));
this.debug('in findTestSubject: ' + testSubjSelector(selector));
return this.remote
.setFindTimeout(defaultTimeout)
.findDisplayedByCssSelector(testSubjSelector(selector));
}
};

Expand Down
Loading