Skip to content

Commit

Permalink
[5.6] Make window 100p wider and select Vector Map (elastic#16214)
Browse files Browse the repository at this point in the history
* Make window 100p wider and select Vector Map

* Remove unused pageObject
  • Loading branch information
Lee Drengenberg authored Jan 23, 2018
1 parent 9a0e8a8 commit 5bdcc7d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion test/functional/apps/visualize/_gauge_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function ({ getService, getPageObjects }) {
});

it('should show correct values for fields with fieldFormatters', async function () {
const expectedTexts = [ '2,904\nwin 8: Count', '5.528KB' ];
const expectedTexts = [ '2,904\nwin 8: Count', '5.528KB\nwin 8: Average bytes' ];


await PageObjects.visualize.closeMetricEditor();
Expand Down
41 changes: 23 additions & 18 deletions test/functional/apps/visualize/_region_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ export default function ({ getService, getPageObjects }) {
log.debug('Field = geo.src');
return PageObjects.visualize.selectField('geo.src');
})
.then(function clickOptions() {
log.debug('clickOptions()');
return PageObjects.visualize.clickOptions();
})
.then(function selectVectorMap() {
log.debug('Vector Map = World Countries');
return PageObjects.visualize.selectVectorMap('US States');
})
.then(function () {
return PageObjects.visualize.clickGo();
})
Expand Down Expand Up @@ -66,27 +74,24 @@ export default function ({ getService, getPageObjects }) {
});

it('should change color ramp', function () {
return PageObjects.visualize.clickOptions()
.then(function () {
return PageObjects.visualize.selectFieldById('Blues', 'colorSchema');
})
.then(function () {
return PageObjects.visualize.clickGo();
})
.then(function () {
//this should visualize right away, without re-requesting data
return PageObjects.visualize.getVectorMapData();
})
.then(function (data) {
return PageObjects.visualize.selectFieldById('Blues', 'colorSchema')
.then(function () {
return PageObjects.visualize.clickGo();
})
.then(function () {
//this should visualize right away, without re-requesting data
return PageObjects.visualize.getVectorMapData();
})
.then(function (data) {

log.debug('Actual data-----------------------');
log.debug(data);
log.debug('---------------------------------');
log.debug('Actual data-----------------------');
log.debug(data);
log.debug('---------------------------------');

const expectedColors = [{ color: 'rgb(190,215,236)' }, { color: 'rgb(7,67,136)' }];
const expectedColors = [{ color: 'rgb(190,215,236)' }, { color: 'rgb(7,67,136)' }];

expect(data).to.eql(expectedColors);
});
expect(data).to.eql(expectedColors);
});
});

});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/visualize/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function ({ getService, loadTestFile }) {

describe('visualize app', function () {
before(function () {
remote.setWindowSize(1280,800);
remote.setWindowSize(1380,800);

log.debug('Starting visualize before method');
const logstash = esArchiver.loadIfNeeded('logstash_functional');
Expand Down
7 changes: 7 additions & 0 deletions test/functional/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,13 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
});
}

selectVectorMap(map) {
return remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector(`#regionMap > option[label="${map}"]`)
.click();
}

}

return new VisualizePage();
Expand Down

0 comments on commit 5bdcc7d

Please sign in to comment.