Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed May 3, 2023
1 parent 2fd11d5 commit fba01b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +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: input.title ?? libraryTitle,
} as unknown as ValType;
};

Expand Down
6 changes: 1 addition & 5 deletions test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,7 @@ export class DashboardPageObject extends FtrService {
public async getPanelTitles() {
this.log.debug('in getPanelTitles');
const titleObjects = await this.find.allByCssSelector('span.embPanel__titleInner');
const titles = await Promise.all(
titleObjects.map(async (title) => await title.getVisibleText())
);
this.log.debug('panel titles:', titles);
return titles;
return await Promise.all(titleObjects.map(async (title) => await title.getVisibleText()));
}

/**
Expand Down

0 comments on commit fba01b5

Please sign in to comment.