Take screenshots of UI throughout functional tests.
|
@ -13,7 +13,6 @@ bdd.describe('console app', function describeIndexTests() {
|
|||
return common.navigateToApp('console', false);
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show the default request', function () {
|
||||
var expectedRequest = [
|
||||
'GET _search',
|
||||
|
@ -24,9 +23,11 @@ bdd.describe('console app', function describeIndexTests() {
|
|||
'}',
|
||||
''
|
||||
];
|
||||
common.saveScreenshot('Console-help-expanded');
|
||||
// collapse the help pane because we only get the VISIBLE TEXT, not the part that is scrolled
|
||||
return consolePage.collapseHelp()
|
||||
.then(function () {
|
||||
common.saveScreenshot('Console-help-collapsed');
|
||||
return common.try(function () {
|
||||
return consolePage.getRequest()
|
||||
.then(function (actualRequest) {
|
||||
|
@ -40,6 +41,7 @@ bdd.describe('console app', function describeIndexTests() {
|
|||
var expectedResponseContains = '"_index": ".kibana",';
|
||||
return consolePage.clickPlay()
|
||||
.then(function () {
|
||||
common.saveScreenshot('Console-default-request');
|
||||
return common.try(function () {
|
||||
return consolePage.getResponse()
|
||||
.then(function (actualResponse) {
|
||||
|
|
|
@ -42,6 +42,8 @@ bdd.describe('dashboard tab', function describeIndexTests() {
|
|||
];
|
||||
|
||||
bdd.it('should be able to add visualizations to dashboard', function addVisualizations() {
|
||||
common.saveScreenshot('Dashboard-no-visualizations');
|
||||
|
||||
function addVisualizations(arr) {
|
||||
return arr.reduce(function (promise, vizName) {
|
||||
return promise
|
||||
|
@ -54,13 +56,13 @@ bdd.describe('dashboard tab', function describeIndexTests() {
|
|||
return addVisualizations(visualizations)
|
||||
.then(function () {
|
||||
common.debug('done adding visualizations');
|
||||
common.saveScreenshot('Dashboard-add-visualizations');
|
||||
});
|
||||
});
|
||||
|
||||
bdd.it('set the timepicker time to that which contains our test data', function setTimepicker() {
|
||||
var fromTime = '2015-09-19 06:31:44.000';
|
||||
var toTime = '2015-09-23 18:31:44.000';
|
||||
var testSubName = 'Dashboard Test 1';
|
||||
|
||||
// .then(function () {
|
||||
common.debug('Set absolute time range from \"' + fromTime + '\" to \"' + toTime + '\"');
|
||||
|
@ -69,21 +71,23 @@ bdd.describe('dashboard tab', function describeIndexTests() {
|
|||
return common.sleep(4000);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
common.saveScreenshot('Dashboard-set-timepicker');
|
||||
});
|
||||
});
|
||||
|
||||
bdd.it('should save and load dashboard', function saveAndLoadDashboard() {
|
||||
var testSubName = 'Dashboard Test 1';
|
||||
const dashboardName = 'Dashboard Test 1';
|
||||
// TODO: save time on the dashboard and test it
|
||||
return dashboardPage.saveDashboard(testSubName)
|
||||
return dashboardPage.saveDashboard(dashboardName)
|
||||
// click New Dashboard just to clear the one we just created
|
||||
.then(function () {
|
||||
return dashboardPage.clickNewDashboard();
|
||||
})
|
||||
.then(function () {
|
||||
return dashboardPage.loadSavedDashboard(testSubName);
|
||||
return dashboardPage.loadSavedDashboard(dashboardName);
|
||||
})
|
||||
.then(function () {
|
||||
common.saveScreenshot('Dashboard-load-saved');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -94,6 +98,9 @@ bdd.describe('dashboard tab', function describeIndexTests() {
|
|||
common.log('visualization titles = ' + panelTitles);
|
||||
expect(panelTitles).to.eql(visualizations);
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
common.saveScreenshot('Dashboard-has-visualizations');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -110,6 +117,7 @@ bdd.describe('dashboard tab', function describeIndexTests() {
|
|||
return dashboardPage.getPanelData()
|
||||
.then(function (panelTitles) {
|
||||
common.log('visualization titles = ' + panelTitles);
|
||||
common.saveScreenshot('Dashboard-visualization-sizes');
|
||||
expect(panelTitles).to.eql(visObjects);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -38,6 +38,7 @@ bdd.describe('discover tab', function describeIndexTests() {
|
|||
|
||||
bdd.describe('field data', function () {
|
||||
bdd.it('should initially be expanded', function () {
|
||||
common.saveScreenshot('Discover-sidebar-expanded');
|
||||
return discoverPage.getSidebarWidth()
|
||||
.then(function (width) {
|
||||
common.debug('expanded sidebar width = ' + width);
|
||||
|
@ -48,6 +49,7 @@ bdd.describe('discover tab', function describeIndexTests() {
|
|||
bdd.it('should collapse when clicked', function () {
|
||||
return discoverPage.toggleSidebarCollapse()
|
||||
.then(function () {
|
||||
common.saveScreenshot('Discover-sidebar-collapsed');
|
||||
common.debug('discoverPage.getSidebarWidth()');
|
||||
return discoverPage.getSidebarWidth();
|
||||
})
|
||||
|
|
|
@ -58,6 +58,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
return headerPage.getToastMessage();
|
||||
})
|
||||
.then(function (toastMessage) {
|
||||
common.saveScreenshot('Discover-save-query-toast');
|
||||
expect(toastMessage).to.be(expectedSavedQueryMessage);
|
||||
})
|
||||
.then(function () {
|
||||
|
@ -80,6 +81,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
return discoverPage.getCurrentQueryName();
|
||||
})
|
||||
.then(function (actualQueryNameString) {
|
||||
common.saveScreenshot('Discover-load-query');
|
||||
expect(actualQueryNameString).to.be(queryName1);
|
||||
});
|
||||
});
|
||||
|
@ -289,6 +291,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
|
||||
bdd.it('should show "no results"', () => {
|
||||
return discoverPage.hasNoResults().then(visible => {
|
||||
common.saveScreenshot('Discover-no-results');
|
||||
expect(visible).to.be(true);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -49,6 +49,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
return common.try(function tryingForTime() {
|
||||
return discoverPage.getHitCount()
|
||||
.then(function compareData(hitCount) {
|
||||
common.saveScreenshot('Discover-field-data');
|
||||
expect(hitCount).to.be(expectedHitCount);
|
||||
});
|
||||
});
|
||||
|
@ -64,7 +65,6 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('search _type:apache should show the correct hit count', function () {
|
||||
var expectedHitCount = '11,156';
|
||||
return discoverPage.query('_type:apache')
|
||||
|
@ -222,6 +222,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
return common.try(function tryingForTime() {
|
||||
return discoverPage.getDocTableIndex(1)
|
||||
.then(function (rowData) {
|
||||
common.saveScreenshot('Discover-sort-down');
|
||||
expect(rowData).to.be(ExpectedDoc);
|
||||
});
|
||||
});
|
||||
|
@ -237,6 +238,7 @@ bdd.describe('discover app', function describeIndexTests() {
|
|||
return headerPage.getToastMessage();
|
||||
})
|
||||
.then(function (toastMessage) {
|
||||
common.saveScreenshot('Discover-syntax-error-toast');
|
||||
expect(toastMessage).to.be(expectedError);
|
||||
})
|
||||
.then(function () {
|
||||
|
|
|
@ -56,6 +56,7 @@ bdd.describe('shared links', function describeIndexTests() {
|
|||
var expectedCaption = 'Share a link';
|
||||
return discoverPage.clickShare()
|
||||
.then(function () {
|
||||
common.saveScreenshot('Discover-share-link');
|
||||
return discoverPage.getShareCaption();
|
||||
})
|
||||
.then(function (actualCaption) {
|
||||
|
@ -85,6 +86,7 @@ bdd.describe('shared links', function describeIndexTests() {
|
|||
return headerPage.getToastMessage();
|
||||
})
|
||||
.then(function (toastMessage) {
|
||||
common.saveScreenshot('Discover-copy-to-clipboard-toast');
|
||||
expect(toastMessage).to.match(expectedToastMessage);
|
||||
})
|
||||
.then(function () {
|
||||
|
@ -98,6 +100,7 @@ bdd.describe('shared links', function describeIndexTests() {
|
|||
return discoverPage.clickShortenUrl()
|
||||
.then(function () {
|
||||
return common.try(function tryingForTime() {
|
||||
common.saveScreenshot('Discover-shorten-url-button');
|
||||
return discoverPage.getShortenedUrl()
|
||||
.then(function (actualUrl) {
|
||||
expect(actualUrl).to.match(re);
|
||||
|
|
|
@ -25,10 +25,12 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
|
|||
bdd.it('should allow setting advanced settings', function () {
|
||||
return settingsPage.clickAdvancedTab()
|
||||
.then(function TestCallSetAdvancedSettingsForTimezone() {
|
||||
common.saveScreenshot('Settings-advanced-tab');
|
||||
common.debug('calling setAdvancedSetting');
|
||||
return settingsPage.setAdvancedSettings('dateFormat:tz', 'America/Phoenix');
|
||||
})
|
||||
.then(function GetAdvancedSetting() {
|
||||
common.saveScreenshot('Settings-set-timezone');
|
||||
return settingsPage.getAdvancedSettings('dateFormat:tz');
|
||||
})
|
||||
.then(function (advancedSetting) {
|
||||
|
|
|
@ -30,6 +30,7 @@ bdd.describe('user input reactions', function () {
|
|||
return settingsPage.getTimeBasedIndexPatternCheckbox(waitTime);
|
||||
})
|
||||
.then(function () {
|
||||
common.saveScreenshot('Settings-indices-hide-time-based-index-pattern');
|
||||
// we expect the promise above to fail
|
||||
var handler = common.handleError(self);
|
||||
var msg = 'Found time based index pattern checkbox';
|
||||
|
@ -47,6 +48,7 @@ bdd.describe('user input reactions', function () {
|
|||
.then(function () {
|
||||
return settingsPage.getCreateButton().isEnabled()
|
||||
.then(function (enabled) {
|
||||
common.saveScreenshot('Settings-indices-enable-creation');
|
||||
expect(enabled).to.be.ok();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -26,6 +26,7 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
|
|||
bdd.it('should have index pattern in page header', function pageHeader() {
|
||||
return settingsPage.getIndexPageHeading().getVisibleText()
|
||||
.then(function (patternName) {
|
||||
common.saveScreenshot('Settings-indices-new-index-pattern');
|
||||
expect(patternName).to.be('logstash-*');
|
||||
});
|
||||
});
|
||||
|
@ -72,6 +73,7 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
|
|||
var expectedAlertText = 'Are you sure you want to remove this index pattern?';
|
||||
return settingsPage.removeIndexPattern()
|
||||
.then(function (alertText) {
|
||||
common.saveScreenshot('Settings-indices-confirm-remove-index-pattern');
|
||||
expect(alertText).to.be(expectedAlertText);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -63,6 +63,7 @@ bdd.describe('index result popularity', function describeIndexTests() {
|
|||
.then(function (popularity) {
|
||||
common.debug('popularity = ' + popularity);
|
||||
expect(popularity).to.be('1');
|
||||
common.saveScreenshot('Settings-indices-result-popularity-updated');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -101,6 +102,7 @@ bdd.describe('index result popularity', function describeIndexTests() {
|
|||
.then(function (popularity) {
|
||||
common.debug('popularity = ' + popularity);
|
||||
expect(popularity).to.be('1');
|
||||
common.saveScreenshot('Settings-indices-result-popularity-saved');
|
||||
});
|
||||
});
|
||||
}); // end 'change popularity'
|
||||
|
|
|
@ -51,6 +51,7 @@ bdd.describe('index result field sort', function describeIndexTests() {
|
|||
return col.selector();
|
||||
})
|
||||
.then(function (rowText) {
|
||||
common.saveScreenshot(`Settings-indices-column-${col.heading}-sort-ascending.png`);
|
||||
expect(rowText).to.be(col.first);
|
||||
});
|
||||
});
|
||||
|
@ -64,6 +65,7 @@ bdd.describe('index result field sort', function describeIndexTests() {
|
|||
return col.selector();
|
||||
})
|
||||
.then(function (rowText) {
|
||||
common.saveScreenshot(`Settings-indices-column-${col.heading}-sort-descending.png`);
|
||||
expect(rowText).to.be(col.last);
|
||||
});
|
||||
});
|
||||
|
@ -115,6 +117,7 @@ bdd.describe('index result field sort', function describeIndexTests() {
|
|||
return settingsPage.getPageFieldCount();
|
||||
})
|
||||
.then(function (pageCount) {
|
||||
common.saveScreenshot('Settings-indices-paged');
|
||||
var expectedSize = (val < 4) ? expectedDefaultPageSize : expectedLastPageCount;
|
||||
expect(pageCount.length).to.be(expectedSize);
|
||||
});
|
||||
|
|
|
@ -20,6 +20,7 @@ bdd.describe('initial state', function () {
|
|||
bdd.it('should load with time pattern checked', function () {
|
||||
return settingsPage.getTimeBasedEventsCheckbox().isSelected()
|
||||
.then(function (selected) {
|
||||
common.saveScreenshot('Settings-initial-state');
|
||||
expect(selected).to.be.ok();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -61,13 +61,13 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
|
||||
bdd.describe('area charts', function indexPatternCreation() {
|
||||
var testSubName = 'AreaChart';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
var vizName1 = 'Visualization AreaChart';
|
||||
|
||||
bdd.it('should save and load', function pageHeader() {
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
.then(function (message) {
|
||||
common.debug('Saved viz message = ' + message);
|
||||
common.saveScreenshot('Visualize-area-chart-save-toast');
|
||||
expect(message).to.be('Visualization Editor: Saved Visualization \"' + vizName1 + '\"');
|
||||
})
|
||||
.then(function testVisualizeWaitForToastMessageGone() {
|
||||
|
@ -87,7 +87,6 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct chart, take screenshot', function pageHeader() {
|
||||
var chartHeight = 0;
|
||||
var xAxisLabels = [ '2015-09-20 00:00', '2015-09-21 00:00',
|
||||
|
@ -118,15 +117,11 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
.then(function (paths) {
|
||||
common.debug('expectedAreaChartData = ' + expectedAreaChartData);
|
||||
common.debug('actual chart data = ' + paths);
|
||||
common.saveScreenshot('Visualize-area-chart');
|
||||
expect(paths).to.eql(expectedAreaChartData);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct data', function pageHeader() {
|
||||
var expectedTableData = [ 'September 20th 2015, 00:00:00.000 37',
|
||||
'September 20th 2015, 03:00:00.000 202',
|
||||
|
@ -166,8 +161,5 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
expect(data.trim().split('\n')).to.eql(expectedTableData);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,9 +16,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
|
||||
bdd.describe('chart types', function indexPatternCreation() {
|
||||
|
||||
bdd.it('should show the correct chart types', function pageHeader() {
|
||||
|
||||
var expectedChartTypes = [
|
||||
'Area chart', 'Data table', 'Line chart', 'Markdown widget',
|
||||
'Metric', 'Pie chart', 'Tile map', 'Vertical bar chart'
|
||||
|
@ -28,6 +26,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
.then(function testChartTypes(chartTypes) {
|
||||
common.debug('returned chart types = ' + chartTypes);
|
||||
common.debug('expected chart types = ' + expectedChartTypes);
|
||||
common.saveScreenshot('Visualize-chart-types');
|
||||
expect(chartTypes).to.eql(expectedChartTypes);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -52,10 +52,8 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.describe('data table', function indexPatternCreation() {
|
||||
var testSubName = 'DataTable';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
var vizName1 = 'Visualization DataTable';
|
||||
|
||||
bdd.it('should be able to save and load', function pageHeader() {
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
|
@ -74,7 +72,6 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct data, take screenshot', function pageHeader() {
|
||||
var chartHeight = 0;
|
||||
var expectedChartData = [ '0 2,088', '2,000 2,748', '4,000 2,707', '6,000 2,876',
|
||||
|
@ -84,14 +81,10 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
return visualizePage.getDataTableData()
|
||||
.then(function showData(data) {
|
||||
common.debug(data.split('\n'));
|
||||
common.saveScreenshot('Visualize-data-table');
|
||||
expect(data.split('\n')).to.eql(expectedChartData);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -52,12 +52,9 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
|
||||
bdd.describe('line charts', function indexPatternCreation() {
|
||||
var testSubName = 'LineChart';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
var vizName1 = 'Visualization LineChart';
|
||||
|
||||
bdd.it('should be able to save and load', function pageHeader() {
|
||||
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var remote = this.remote;
|
||||
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
|
@ -90,6 +87,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
.then(function () {
|
||||
return visualizePage.getLineChartData('fill="#57c17b"')
|
||||
.then(function showData(data) {
|
||||
common.saveScreenshot('Visualize-line-chart');
|
||||
var tolerance = 10; // the y-axis scale is 10000 so 10 is 0.1%
|
||||
for (var x = 0; x < data.length; x++) {
|
||||
common.debug('x=' + x + ' expectedChartData[x].split(\' \')[1] = ' +
|
||||
|
@ -99,11 +97,6 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
}
|
||||
common.debug('Done');
|
||||
});
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
// take a snapshot just as an example.
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -14,11 +14,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
var toTime = '2015-09-23 18:31:44.000';
|
||||
|
||||
bdd.before(function () {
|
||||
|
||||
var testSubName = 'MetricChart';
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
|
||||
var vizName1 = 'Visualization MetricChart';
|
||||
common.debug('navigateToApp visualize');
|
||||
return common.navigateToApp('visualize')
|
||||
.then(function () {
|
||||
|
@ -34,7 +30,6 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.describe('metric chart', function indexPatternCreation() {
|
||||
|
||||
bdd.it('should show Count', function pageHeader() {
|
||||
|
@ -44,6 +39,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
return common.try(function tryingForTime() {
|
||||
return visualizePage.getMetric()
|
||||
.then(function (metricValue) {
|
||||
common.saveScreenshot('Visualize-metric-chart');
|
||||
expect(expectedCount).to.eql(metricValue.split('\n'));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -60,12 +60,9 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
|
||||
|
||||
bdd.describe('pie chart', function indexPatternCreation() {
|
||||
var testSubName = 'PieChart';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
|
||||
var vizName1 = 'Visualization PieChart';
|
||||
|
||||
bdd.it('should save and load', function pageHeader() {
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var remote = this.remote;
|
||||
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
|
@ -96,11 +93,8 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
.then(function (pieData) {
|
||||
var barHeightTolerance = 1;
|
||||
common.debug('pieData.length = ' + pieData.length);
|
||||
common.saveScreenshot('Visualize-pie-chart');
|
||||
expect(pieData.length).to.be(expectedPieChartSliceCount);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -122,7 +116,5 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
expect(data.trim().split('\n')).to.eql(expectedTableData);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -50,14 +50,10 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.describe('tile map chart', function indexPatternCreation() {
|
||||
|
||||
bdd.it('should save and load, take screenshot', function pageHeader() {
|
||||
var testSubName = 'TileMap';
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
// var remote = this.remote;
|
||||
var vizName1 = 'Visualization TileMap';
|
||||
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
.then(function (message) {
|
||||
|
@ -79,14 +75,11 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
common.saveScreenshot('Visualize-site-map');
|
||||
});
|
||||
});
|
||||
|
||||
bdd.it('should show correct tile map data', function pageHeader() {
|
||||
var testSubName = 'TileMap';
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
// var remote = this.remote;
|
||||
var expectedTableData = [ 'dn 1,429', 'dp 1,418', '9y 1,215', '9z 1,099', 'dr 1,076',
|
||||
'dj 982', '9v 938', '9q 722', '9w 475', 'cb 457', 'c2 453', '9x 420', 'dq 399',
|
||||
'9r 396', '9t 274', 'c8 271', 'dh 214', 'b6 207', 'bd 206', 'b7 167', 'f0 141',
|
||||
|
@ -107,7 +100,5 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -52,8 +52,7 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
|
||||
bdd.describe('vertical bar chart', function indexPatternCreation() {
|
||||
var testSubName = 'VerticalBarChart';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
var vizName1 = 'Visualization VerticalBarChart';
|
||||
|
||||
bdd.it('should save and load', function pageHeader() {
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
|
@ -75,7 +74,6 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct chart, take screenshot', function pageHeader() {
|
||||
var expectedChartValues = [37, 202, 740, 1437, 1371, 751, 188, 31, 42, 202, 683,
|
||||
1361, 1415, 707, 177, 27, 32, 175, 707, 1408, 1355, 726, 201, 29
|
||||
|
@ -91,17 +89,13 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
.then(function showData(data) {
|
||||
common.debug('data=' + data);
|
||||
common.debug('data.length=' + data.length);
|
||||
common.saveScreenshot('Visualize-vertical-bar-chart');
|
||||
expect(data).to.eql(expectedChartValues);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct data', function pageHeader() {
|
||||
var testSubName = 'VerticalBarChart';
|
||||
// this is only the first page of the tabular data.
|
||||
var expectedChartData = [ 'September 20th 2015, 00:00:00.000 37',
|
||||
'September 20th 2015, 03:00:00.000 202',
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import { bdd, common } from '../../support';
|
||||
import {
|
||||
bdd,
|
||||
common
|
||||
} from '../../support';
|
||||
|
||||
var expect = require('expect.js');
|
||||
|
||||
|
@ -15,6 +18,7 @@ bdd.describe('status page', function () {
|
|||
.findByCssSelector('.plugin_status_breakdown')
|
||||
.getVisibleText()
|
||||
.then(function (text) {
|
||||
common.saveScreenshot('Status');
|
||||
expect(text.indexOf('kibana 1.0.0 Ready')).to.be.above(-1);
|
||||
});
|
||||
})
|
||||
|
|
BIN
test/screenshots/baseline/Console-default-request.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
test/screenshots/baseline/Console-help-collapsed.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
test/screenshots/baseline/Console-help-expanded.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
test/screenshots/baseline/Dashboard-add-visualizations.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
test/screenshots/baseline/Dashboard-has-visualizations.png
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
test/screenshots/baseline/Dashboard-load-saved.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
test/screenshots/baseline/Dashboard-no-visualizations.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
test/screenshots/baseline/Dashboard-set-timepicker.png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
test/screenshots/baseline/Dashboard-visualization-sizes.png
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
test/screenshots/baseline/Discover-copy-to-clipboard-toast.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-field-data.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-load-query.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-no-results.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
test/screenshots/baseline/Discover-save-query-toast.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
test/screenshots/baseline/Discover-share-link.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-shorten-url-button.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-sidebar-collapsed.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
test/screenshots/baseline/Discover-sidebar-expanded.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
test/screenshots/baseline/Discover-sort-down.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Discover-syntax-error-toast.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
test/screenshots/baseline/Settings-advanced-tab.png
Normal file
After Width: | Height: | Size: 384 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 83 KiB |
BIN
test/screenshots/baseline/Settings-indices-enable-creation.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
test/screenshots/baseline/Settings-indices-new-index-pattern.png
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
test/screenshots/baseline/Settings-indices-paged.png
Normal file
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 38 KiB |
BIN
test/screenshots/baseline/Settings-initial-state.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
test/screenshots/baseline/Settings-set-timezone.png
Normal file
After Width: | Height: | Size: 389 KiB |
BIN
test/screenshots/baseline/Status.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
test/screenshots/baseline/Visualize-area-chart-save-toast.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
test/screenshots/baseline/Visualize-area-chart.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
test/screenshots/baseline/Visualize-chart-types.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
test/screenshots/baseline/Visualize-data-table.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
test/screenshots/baseline/Visualize-line-chart.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
test/screenshots/baseline/Visualize-metric-chart.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
test/screenshots/baseline/Visualize-pie-chart.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
test/screenshots/baseline/Visualize-site-map.png
Normal file
After Width: | Height: | Size: 673 KiB |
BIN
test/screenshots/baseline/Visualize-vertical-bar-chart.png
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 675 KiB |
Before Width: | Height: | Size: 48 KiB |
1
test/screenshots/visual_regression_gallery.html
Normal file
|
@ -253,7 +253,7 @@ export default (function () {
|
|||
const testName = (testObj.parent) ? [testObj.parent.name, testObj.name].join('_') : testObj.name;
|
||||
return reason => {
|
||||
const now = Date.now();
|
||||
const fileName = `failure_${now}_${testName}.png`;
|
||||
const fileName = `failure_${now}_${testName}`;
|
||||
|
||||
return this.saveScreenshot(fileName, true)
|
||||
.then(function () {
|
||||
|
@ -266,7 +266,7 @@ export default (function () {
|
|||
try {
|
||||
const directoryName = isFailure ? 'failure' : 'session';
|
||||
const directoryPath = path.resolve(`test/screenshots/${directoryName}`);
|
||||
const filePath = path.resolve(directoryPath, fileName);
|
||||
const filePath = path.resolve(directoryPath, `${fileName}.png`);
|
||||
this.debug(`Taking screenshot "${filePath}"`);
|
||||
|
||||
const screenshot = await this.remote.takeScreenshot();
|
||||
|
|