Skip to content

Commit

Permalink
old share panel removal
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Apr 1, 2024
1 parent cd34f52 commit 1f2ad7d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/plugins/share/public/components/share_tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ShareMenuTabs = () => {

const { allowEmbed, objectType, onClose, shareMenuItems } = shareContext;

const tabs = [linkTab, allowEmbed ? embedTab : null].filter(Boolean);
const tabs = [linkTab];
if (shareMenuItems) {
shareMenuItems
// need to filter out the null shareMenuItem from Lens and just use the reporting image modal that includes CSV for Lens
Expand All @@ -45,6 +45,8 @@ export const ShareMenuTabs = () => {
});
}

if (allowEmbed) tabs.push(embedTab);

return (
<TabbedModal
tabs={tabs}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/canvas/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await this.clickShareTopNavButton();
}
const menuPanel = await this.find.byCssSelector('div.euiContextMenuPanel');
await this.testSubjects.click(`sharePanel-PDFReports`);
await this.testSubjects.click(`Export`);
await this.testSubjects.waitForDeleted(menuPanel);

await PageObjects.reporting.clickGenerateReportButton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function (ctx: FtrProviderContext) {

it('shows CSV reports', async () => {
await PageObjects.share.clickShareTopNavButton();
await testSubjects.existOrFail('sharePanel-CSVReports');
await testSubjects.existOrFail('Export');
await PageObjects.share.clickShareTopNavButton();
});

Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/reporting_functional/services/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function createScenarios(
};
const tryDiscoverCsvNotAvailable = async () => {
await PageObjects.share.clickShareTopNavButton();
await testSubjects.missingOrFail('sharePanel-CSVReports');
await testSubjects.missingOrFail('Export');
};
const tryDiscoverCsvSuccess = async () => {
await PageObjects.reporting.openExportTab();
Expand All @@ -128,7 +128,7 @@ export function createScenarios(
};
const tryGeneratePdfNotAvailable = async () => {
PageObjects.share.clickShareTopNavButton();
await testSubjects.missingOrFail(`sharePanel-PDFReports`);
await testSubjects.missingOrFail(`Export`);
};
const tryGeneratePdfSuccess = async () => {
await PageObjects.reporting.openExportTab();
Expand All @@ -141,7 +141,7 @@ export function createScenarios(
};
const tryReportsNotAvailable = async () => {
await PageObjects.share.clickShareTopNavButton();
await testSubjects.missingOrFail('sharePanel-Reports');
await testSubjects.missingOrFail('Export');
};

return {
Expand Down

0 comments on commit 1f2ad7d

Please sign in to comment.