diff --git a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx index ff35b5f79f867..aa327f11d4008 100644 --- a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx +++ b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx @@ -137,14 +137,12 @@ export class AttributeService< return input as ValType; } const { attributes } = await this.unwrapAttributes(input); - const libraryTitle = attributes.title; const { savedObjectId, ...originalInputToPropagate } = input; return { ...originalInputToPropagate, // by value visualizations should not have default titles and/or descriptions ...{ attributes: omit(attributes, ['title', 'description']) }, - title: libraryTitle, } as unknown as ValType; }; diff --git a/test/functional/services/dashboard/panel_actions.ts b/test/functional/services/dashboard/panel_actions.ts index 8a7f71d29513b..f81ddf9d69bb5 100644 --- a/test/functional/services/dashboard/panel_actions.ts +++ b/test/functional/services/dashboard/panel_actions.ts @@ -26,6 +26,7 @@ const DASHBOARD_TOP_OFFSET = 96 + 105; // 96 for Kibana navigation bar + 105 for export class DashboardPanelActionsService extends FtrService { private readonly log = this.ctx.getService('log'); + private readonly retry = this.ctx.getService('retry'); private readonly browser = this.ctx.getService('browser'); private readonly inspector = this.ctx.getService('inspector'); private readonly testSubjects = this.ctx.getService('testSubjects'); @@ -221,6 +222,9 @@ export class DashboardPanelActionsService extends FtrService { await this.clickContextMenuMoreItem(); } await this.testSubjects.click(UNLINK_FROM_LIBRARY_TEST_SUBJ); + await this.testSubjects.waitForDeleted( + 'embeddablePanelNotification-ACTION_LIBRARY_NOTIFICATION' + ); } async saveToLibrary(newTitle: string, parent?: WebElementWrapper) { @@ -235,6 +239,11 @@ export class DashboardPanelActionsService extends FtrService { clearWithKeyboard: true, }); await this.testSubjects.click('confirmSaveSavedObjectButton'); + await this.retry.try(async () => { + await this.testSubjects.existOrFail( + 'embeddablePanelNotification-ACTION_LIBRARY_NOTIFICATION' + ); + }); } async expectExistsPanelAction(testSubject: string, title?: string) { diff --git a/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts b/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts index 43bafdeaf0a63..14970ba7764ab 100644 --- a/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts +++ b/x-pack/test/functional/apps/dashboard/group2/panel_titles.ts @@ -118,9 +118,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/156539 - // FLAKY: https://github.com/elastic/kibana/issues/156544 - describe.skip('by reference', () => { + describe('by reference', () => { it('linking a by value panel with a custom title to the library will overwrite the custom title with the library title', async () => { await dashboardPanelActions.customizePanel(); await dashboardCustomizePanel.setCustomPanelTitle(CUSTOM_TITLE); diff --git a/x-pack/test/functional/apps/lens/group4/dashboard.ts b/x-pack/test/functional/apps/lens/group4/dashboard.ts index 6e4255808df8c..daa8a750ad1c8 100644 --- a/x-pack/test/functional/apps/lens/group4/dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/dashboard.ts @@ -251,8 +251,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('save lens panel to embeddable library', async () => { const originalPanel = await testSubjects.find('embeddablePanelHeading-lnsPieVis'); await panelActions.saveToLibrary('lnsPieVis - copy', originalPanel); - await testSubjects.click('confirmSaveSavedObjectButton'); - await testSubjects.existOrFail('addPanelToLibrarySuccess'); const updatedPanel = await testSubjects.find('embeddablePanelHeading-lnsPieVis-copy'); const libraryActionExists = await testSubjects.descendantExists(