Skip to content
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
9 changes: 3 additions & 6 deletions test/functional/apps/console/_console.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ var expect = require('expect.js');
bdd.describe('console app', function describeIndexTests() {
bdd.before(function () {
common.debug('navigateTo console');
return common.navigateToApp('console', false)
.catch(common.handleError(this));
return common.navigateToApp('console', false);
});


Expand All @@ -34,8 +33,7 @@ bdd.describe('console app', function describeIndexTests() {
expect(actualRequest).to.eql(expectedRequest);
});
});
})
.catch(common.handleError(this));
});
});

bdd.it('default request response should contain .kibana' , function () {
Expand All @@ -49,7 +47,6 @@ bdd.describe('console app', function describeIndexTests() {
expect(actualResponse).to.contain(expectedResponseContains);
});
});
})
.catch(common.handleError(this));
});
});
});
15 changes: 5 additions & 10 deletions test/functional/apps/dashboard/_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
// wait for the logstash data load to finish if it hasn't already
.then(function () {
return logstash;
})
.catch(common.handleError(this));
});
});

bdd.describe('add visualizations to dashboard', function dashboardTest() {
Expand Down Expand Up @@ -72,8 +71,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
.then(function takeScreenshot() {
common.debug('Take screenshot');
common.saveScreenshot('./screenshot-' + testSubName + '.png');
})
.catch(common.handleError(this));
});
});

bdd.it('should save and load dashboard', function saveAndLoadDashboard() {
Expand All @@ -86,8 +84,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
})
.then(function () {
return dashboardPage.loadSavedDashboard(testSubName);
})
.catch(common.handleError(this));
});
});

bdd.it('should have all the expected visualizations', function checkVisualizations() {
Expand All @@ -97,8 +94,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
common.log('visualization titles = ' + panelTitles);
expect(panelTitles).to.eql(visualizations);
});
})
.catch(common.handleError(this));
});
});

bdd.it('should have all the expected initial sizes', function checkVisualizationSizes() {
Expand All @@ -116,8 +112,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
common.log('visualization titles = ' + panelTitles);
expect(panelTitles).to.eql(visObjects);
});
})
.catch(common.handleError(this));
});
});
});
});
12 changes: 4 additions & 8 deletions test/functional/apps/discover/_collapse_expand.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ bdd.describe('discover tab', function describeIndexTests() {
.then(function () {
common.debug('setAbsoluteRange');
return headerPage.setAbsoluteRange(fromTime, toTime);
})
.catch(common.handleError(this));
});
});

bdd.describe('field data', function () {
Expand All @@ -43,8 +42,7 @@ bdd.describe('discover tab', function describeIndexTests() {
.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 () {
Expand All @@ -56,8 +54,7 @@ bdd.describe('discover tab', function describeIndexTests() {
.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 () {
Expand All @@ -69,8 +66,7 @@ bdd.describe('discover tab', function describeIndexTests() {
.then(function (width) {
common.debug('expanded sidebar width = ' + width);
expect(width > 180).to.be(true);
})
.catch(common.handleError(this));
});
});
});
});
60 changes: 20 additions & 40 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ bdd.describe('discover app', function describeIndexTests() {
.then(function () {
common.debug('setAbsoluteRange');
return headerPage.setAbsoluteRange(fromTime, toTime);
})
.catch(common.handleError(this));
});
});


Expand All @@ -48,8 +47,7 @@ bdd.describe('discover app', function describeIndexTests() {
return discoverPage.getTimespanText()
.then(function (actualTimeString) {
expect(actualTimeString).to.be(expectedTimeRangeString);
})
.catch(common.handleError(this));
});
});


Expand All @@ -70,8 +68,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function (actualQueryNameString) {
expect(actualQueryNameString).to.be(queryName1);
})
.catch(common.handleError(this));
});
});

bdd.it('load query should show query name', function () {
Expand All @@ -84,8 +81,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function (actualQueryNameString) {
expect(actualQueryNameString).to.be(queryName1);
})
.catch(common.handleError(this));
});
});

bdd.it('should show the correct hit count', function () {
Expand All @@ -95,8 +91,7 @@ bdd.describe('discover app', function describeIndexTests() {
.then(function compareData(hitCount) {
expect(hitCount).to.be(expectedHitCount);
});
})
.catch(common.handleError(this));
});
});

bdd.it('should show the correct bar chart', function () {
Expand All @@ -109,26 +104,23 @@ bdd.describe('discover app', function describeIndexTests() {
return common.sleep(4000)
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct time range string in chart', function () {
var expectedTimeRangeString = fromTimeString + ' - ' + toTimeString;
return discoverPage.getChartTimespan()
.then(function (actualTimeString) {
expect(actualTimeString).to.be(expectedTimeRangeString);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct initial chart interval of 3 hours', function () {
var expectedChartInterval = 'by 3 hours';
return discoverPage.getChartInterval()
.then(function (actualInterval) {
expect(actualInterval).to.be(expectedChartInterval);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Hourly', function () {
Expand All @@ -152,8 +144,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Daily', function () {
Expand All @@ -167,8 +158,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Weekly', function () {
Expand All @@ -180,8 +170,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('browser back button should show previous interval Daily', function () {
Expand All @@ -200,8 +189,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Monthly', function () {
Expand All @@ -213,8 +201,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Yearly', function () {
Expand All @@ -226,8 +213,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show correct data for chart interval Auto', function () {
Expand All @@ -244,24 +230,21 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return verifyChartData(expectedBarChartData);
})
.catch(common.handleError(this));
});
});

bdd.it('should show Auto chart interval of 3 hours', function () {
var expectedChartInterval = 'by 3 hours';
return discoverPage.getChartInterval()
.then(function (actualInterval) {
expect(actualInterval).to.be(expectedChartInterval);
})
.catch(common.handleError(this));
});
});

bdd.it('should not show "no results"', () => {
return discoverPage.hasNoResults().then(visible => {
expect(visible).to.be(false);
})
.catch(common.handleError(this));
});
});

function verifyChartData(expectedBarChartData) {
Expand Down Expand Up @@ -301,22 +284,19 @@ bdd.describe('discover app', function describeIndexTests() {
bdd.before(() => {
common.debug('setAbsoluteRangeForAnotherQuery');
return headerPage
.setAbsoluteRange(fromTime, toTime)
.catch(common.handleError(this));
.setAbsoluteRange(fromTime, toTime);
});

bdd.it('should show "no results"', () => {
return discoverPage.hasNoResults().then(visible => {
expect(visible).to.be(true);
})
.catch(common.handleError(this));
});
});

bdd.it('should suggest a new time range is picked', () => {
return discoverPage.hasNoResultsTimepicker().then(visible => {
expect(visible).to.be(true);
})
.catch(common.handleError(this));
});
});

bdd.it('should open and close the time picker', () => {
Expand Down
24 changes: 8 additions & 16 deletions test/functional/apps/discover/_field_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ bdd.describe('discover app', function describeIndexTests() {
.then(function () {
common.debug('setAbsoluteRange');
return headerPage.setAbsoluteRange(fromTime, toTime);
})
.catch(common.handleError(this));
});
});


Expand All @@ -53,8 +52,7 @@ bdd.describe('discover app', function describeIndexTests() {
expect(hitCount).to.be(expectedHitCount);
});
});
})
.catch(common.handleError(this));
});
});

bdd.it('the search term should be highlighted in the field data', function () {
Expand All @@ -63,8 +61,7 @@ bdd.describe('discover app', function describeIndexTests() {
.then(function (marks) {
expect(marks.length).to.be(50);
expect(marks.indexOf('php')).to.be(0);
})
.catch(common.handleError(this));
});
});


Expand All @@ -78,17 +75,15 @@ bdd.describe('discover app', function describeIndexTests() {
expect(hitCount).to.be(expectedHitCount);
});
});
})
.catch(common.handleError(this));
});
});

bdd.it('doc view should show Time and _source columns', function () {
var expectedHeader = 'Time _source';
return discoverPage.getDocHeader()
.then(function (header) {
expect(header).to.be(expectedHeader);
})
.catch(common.handleError(this));
});
});

bdd.it('doc view should show oldest time first', function () {
Expand Down Expand Up @@ -139,8 +134,7 @@ bdd.describe('discover app', function describeIndexTests() {
return discoverPage.getDocTableIndex(1)
.then(function (rowData) {
expect(rowData).to.be(ExpectedDoc);
})
.catch(common.handleError(this));
});
});

bdd.it('doc view should sort ascending', function () {
Expand Down Expand Up @@ -231,8 +225,7 @@ bdd.describe('discover app', function describeIndexTests() {
expect(rowData).to.be(ExpectedDoc);
});
});
})
.catch(common.handleError(this));
});
});


Expand All @@ -248,8 +241,7 @@ bdd.describe('discover app', function describeIndexTests() {
})
.then(function () {
return headerPage.clickToastOK();
})
.catch(common.handleError(this));
});
});
});
});
Loading