mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fixing flaky maps test (#35176)
## Summary fixes https://github.com/elastic/kibana/issues/35049
This commit is contained in:
parent
0ad9417adf
commit
6ee7d6d236
3 changed files with 17 additions and 2 deletions
|
@ -187,7 +187,7 @@ export async function cleanKibanaIndices({ client, stats, log, kibanaUrl }) {
|
|||
bool: {
|
||||
must_not: {
|
||||
ids: {
|
||||
type: 'doc',
|
||||
type: '_doc',
|
||||
values: ['space:default']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,13 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa
|
|||
describe('spaces feature controls', () => {
|
||||
before(async () => {
|
||||
await esArchiver.loadIfNeeded('maps/data');
|
||||
await esArchiver.load('maps/kibana');
|
||||
PageObjects.maps.setBasePath('/s/custom_space');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload('maps/kibana');
|
||||
PageObjects.maps.setBasePath('');
|
||||
});
|
||||
|
||||
describe('space with no features disabled', () => {
|
||||
|
|
|
@ -19,6 +19,14 @@ export function GisPageProvider({ getService, getPageObjects }) {
|
|||
|
||||
class GisPage {
|
||||
|
||||
constructor() {
|
||||
this.basePath = '';
|
||||
}
|
||||
|
||||
setBasePath(basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
async setAbsoluteRange(start, end) {
|
||||
await PageObjects.timePicker.setAbsoluteRange(start, end);
|
||||
await this.waitForLayersToLoad();
|
||||
|
@ -176,7 +184,7 @@ export function GisPageProvider({ getService, getPageObjects }) {
|
|||
const onPage = await this.onMapListingPage();
|
||||
if (!onPage) {
|
||||
await retry.try(async () => {
|
||||
await PageObjects.common.navigateToUrl('maps', '/');
|
||||
await PageObjects.common.navigateToUrl('maps', '/', { basePath: this.basePath });
|
||||
const onMapListingPage = await this.onMapListingPage();
|
||||
if (!onMapListingPage) throw new Error('Not on map listing page.');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue