Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion x-pack/test/functional/apps/maps/auto_fit_to_bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@

import expect from '@kbn/expect';

export default function ({ getPageObjects }) {
export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['maps']);
const security = getService('security');

describe('auto fit map to bounds', () => {
describe('initial location', () => {
before(async () => {
await security.testUser.setRoles(['global_maps_all', 'test_logstash_reader']);
await PageObjects.maps.loadSavedMap(
'document example - auto fit to bounds for initial location'
);
});

after(async () => {
await security.testUser.restoreDefaults();
});

it('should automatically fit to bounds on initial map load', async () => {
const hits = await PageObjects.maps.getHits();
expect(hits).to.equal('6');
Expand Down