diff --git a/x-pack/test/functional/apps/maps/auto_fit_to_bounds.js b/x-pack/test/functional/apps/maps/auto_fit_to_bounds.js index c8e8db84df96f..5057e015cd6fc 100644 --- a/x-pack/test/functional/apps/maps/auto_fit_to_bounds.js +++ b/x-pack/test/functional/apps/maps/auto_fit_to_bounds.js @@ -25,10 +25,20 @@ export default function ({ getPageObjects }) { await PageObjects.maps.setAndSubmitQuery('machine.os.raw : "ios"'); await PageObjects.maps.waitForMapPanAndZoom(origView); + const hits = await PageObjects.maps.getHits(); + expect(hits).to.equal('2'); + const { lat, lon } = await PageObjects.maps.getView(); expect(Math.round(lat)).to.equal(43); expect(Math.round(lon)).to.equal(-102); }); + + it('should sync layers even when there is not data', async () => { + await PageObjects.maps.setAndSubmitQuery('machine.os.raw : "fake_os_with_no_matches"'); + + const hits = await PageObjects.maps.getHits(); + expect(hits).to.equal('0'); + }); }); describe('with joins', () => {