adding test user to auto fit to bounds test (#75914)

This commit is contained in:
Bhavya RM 2020-08-26 10:02:10 -04:00 committed by GitHub
parent 4f2d4f8b01
commit 4e1b1b5d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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