Skip to content

Commit

Permalink
Fix "data-title" attribute in map embeddable (elastic#88337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant authored Jan 14, 2021
1 parent d080128 commit f33225d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions x-pack/plugins/maps/public/embeddable/map_embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
5 changes: 5 additions & 0 deletions x-pack/test/functional/apps/maps/embeddable/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-*');
Expand Down

0 comments on commit f33225d

Please sign in to comment.