Fix screenshots Data Table and Tile Map.
This commit is contained in:
parent
720faf45dd
commit
b9d626aa70
2 changed files with 13 additions and 19 deletions
|
@ -90,12 +90,10 @@ define(function (require) {
|
|||
|
||||
|
||||
bdd.describe('data table', function indexPatternCreation() {
|
||||
|
||||
bdd.it('should be able to save and load, take screenshot', function pageHeader() {
|
||||
|
||||
var testSubName = 'DataTable';
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
|
||||
bdd.it('should be able to save and load', function pageHeader() {
|
||||
return visualizePage.saveVisualization(vizName1)
|
||||
.then(function (message) {
|
||||
common.debug('Saved viz message = ' + message);
|
||||
|
@ -110,16 +108,11 @@ define(function (require) {
|
|||
.then(function () {
|
||||
return visualizePage.waitForVisualization();
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
|
||||
bdd.it('should show correct data', function pageHeader() {
|
||||
|
||||
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',
|
||||
'8,000 2,863', '10,000 147', '12,000 148', '14,000 129', '16,000 161', '18,000 137'
|
||||
|
@ -130,6 +123,10 @@ define(function (require) {
|
|||
common.debug(data.split('\n'));
|
||||
expect(data.split('\n')).to.eql(expectedChartData);
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ define(function (require) {
|
|||
|
||||
bdd.describe('tile map chart', function indexPatternCreation() {
|
||||
|
||||
bdd.it('should save and load, take screenshot', function pageHeader() {
|
||||
bdd.it('should save and load', function pageHeader() {
|
||||
var testSubName = 'TileMap';
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
var vizName1 = 'Visualization ' + testSubName;
|
||||
|
@ -107,14 +107,10 @@ define(function (require) {
|
|||
.then(function waitForVisualization() {
|
||||
return visualizePage.waitForVisualization();
|
||||
})
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
||||
bdd.it('should show correct tile map data', function pageHeader() {
|
||||
bdd.it('should show correct tile map data, take screenshot', function pageHeader() {
|
||||
var testSubName = 'TileMap';
|
||||
common.debug('Start of test' + testSubName + 'Visualization');
|
||||
// var remote = this.remote;
|
||||
|
@ -137,8 +133,9 @@ define(function (require) {
|
|||
expect(data.trim().split('\n')).to.eql(expectedTableData);
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
return visualizePage.collapseChart();
|
||||
.then(function takeScreenshot() {
|
||||
common.debug('Take screenshot');
|
||||
common.saveScreenshot('./screenshot-' + testSubName + '.png');
|
||||
})
|
||||
.catch(common.handleError(this));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue