Take screenshots of UI throughout functional tests.

This commit is contained in:
CJ Cenizal 2016-06-09 15:02:57 -07:00
parent a553bab16d
commit 0fb84e4696
73 changed files with 64 additions and 77 deletions

View file

@ -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) {

View file

@ -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);
});
});

View file

@ -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();
})

View file

@ -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);
});
});

View file

@ -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 () {

View file

@ -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);

View file

@ -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) {

View file

@ -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();
});
});

View file

@ -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);
});
});

View file

@ -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'

View file

@ -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);
});

View file

@ -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();
});
});

View file

@ -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);
});
});
});
});

View file

@ -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);
});
});

View file

@ -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');
});
});
});
});

View file

@ -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');
});
});

View file

@ -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'));
});
});

View file

@ -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);
});
});
});
});

View file

@ -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() {
});
});
});
});
});

View file

@ -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',

View file

@ -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);
});
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

File diff suppressed because one or more lines are too long

View 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();