diff --git a/test/functional/apps/visualize/_gauge_chart.js b/test/functional/apps/visualize/_gauge_chart.js index 98bb2eba47e57..7f7ca95a63198 100644 --- a/test/functional/apps/visualize/_gauge_chart.js +++ b/test/functional/apps/visualize/_gauge_chart.js @@ -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(); diff --git a/test/functional/apps/visualize/_region_map.js b/test/functional/apps/visualize/_region_map.js index e094dbac7d493..def787f65effb 100644 --- a/test/functional/apps/visualize/_region_map.js +++ b/test/functional/apps/visualize/_region_map.js @@ -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(); }) @@ -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); + }); }); }); diff --git a/test/functional/apps/visualize/index.js b/test/functional/apps/visualize/index.js index 1f377edbb82a3..827af3ac5a32c 100644 --- a/test/functional/apps/visualize/index.js +++ b/test/functional/apps/visualize/index.js @@ -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'); diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index f5b5b4518439a..26d6a6e7c76c2 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -881,6 +881,13 @@ export function VisualizePageProvider({ getService, getPageObjects }) { }); } + selectVectorMap(map) { + return remote + .setFindTimeout(defaultFindTimeout) + .findByCssSelector(`#regionMap > option[label="${map}"]`) + .click(); + } + } return new VisualizePage();