From b3680fece40ad45ac1eed49a8e8ebe22c4eb4d28 Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Sun, 27 Oct 2024 21:37:51 +0530 Subject: [PATCH] fix: application support link with `mailto:` URI schema --- .../MarketPlaceAppDetails.component.tsx | 5 ++++- .../MarketPlaceAppDetails.test.tsx | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.component.tsx index 70ff81f18bb1..21307cfa4ae2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.component.tsx @@ -203,7 +203,10 @@ const MarketPlaceAppDetails = () => { {appData?.supportEmail && ( - + {t('label.get-app-support')} )} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.test.tsx index d3a4bdb6fc3e..5160c722c627 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/MarketPlaceAppDetails/MarketPlaceAppDetails.test.tsx @@ -179,4 +179,15 @@ describe('MarketPlaceAppDetails component', () => { expect(mockPush).toHaveBeenCalledWith('app install path'); }); + + it("should render the correct support email url with 'mailto:' schema", async () => { + render(); + + await waitForElementToBeRemoved(() => screen.getByText('Loader')); + + expect(screen.getByTestId('app-support-email')).toHaveAttribute( + 'href', + 'mailto:support@email.com' + ); + }); });