Fix "data-title" attribute in map embeddable (#88337)

This commit is contained in:
Anton Dosov 2021-01-14 18:46:47 +01:00 committed by GitHub
parent d080128cde
commit f33225d34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -112,14 +112,20 @@ export class MapEmbeddable
return;
}
this._initializeStore();
this._initializeOutput();
try {
await this._initializeOutput();
} catch (e) {
this.onFatalError(e);
return;
}
this._isInitialized = true;
if (this._domNode) {
this.render(this._domNode);
}
}
private async _initializeStore() {
private _initializeStore() {
const store = this._savedMap.getStore();
store.dispatch(setReadOnly(true));
store.dispatch(disableScrollZoom());

View file

@ -55,6 +55,11 @@ export default function ({ getPageObjects, getService }) {
return requestTimestamp;
}
it('should set "data-title" attribute', async () => {
const [{ title }] = await PageObjects.dashboard.getPanelSharedItemData();
expect(title).to.be('join example');
});
it('should pass index patterns to container', async () => {
const indexPatterns = await filterBar.getIndexPatterns();
expect(indexPatterns).to.equal('meta_for_geo_shapes*,logstash-*');