Skip to content

Commit

Permalink
add functional test to ensure sync is called when auto fit to bounds …
Browse files Browse the repository at this point in the history
…with no data
  • Loading branch information
nreese committed Aug 6, 2020
1 parent 5a7398a commit 7c35f5a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x-pack/test/functional/apps/maps/auto_fit_to_bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 7c35f5a

Please sign in to comment.