Skip to content

Commit

Permalink
adding test user to auto fit to bounds test (#75914) (#75981)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyarm authored Aug 26, 2020
1 parent a8b2103 commit fce9d8a
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit fce9d8a

Please sign in to comment.