[5.6] Make window 100p wider and select Vector Map (#16214)

* Make window 100p wider and select Vector Map

* Remove unused pageObject
This commit is contained in:
Lee Drengenberg 2018-01-22 21:01:36 -06:00 committed by GitHub
parent 9a0e8a81e7
commit 5bdcc7d56d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 20 deletions

View file

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

View file

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

View file

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

View file

@ -881,6 +881,13 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
});
}
selectVectorMap(map) {
return remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector(`#regionMap > option[label="${map}"]`)
.click();
}
}
return new VisualizePage();