Skip to content

Commit

Permalink
fix: application support link with mailto: URI schema (#18416)
Browse files Browse the repository at this point in the history
(cherry picked from commit 09e6671)
  • Loading branch information
Sachin-chaurasiya authored and chirag-madlani committed Oct 28, 2024
1 parent 56f3c38 commit 3790cc8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ const MarketPlaceAppDetails = () => {
<Space className="p-t-lg" direction="vertical" size={8}>
<Typography.Text>
{appData?.supportEmail && (
<Typography.Link href={appData?.supportEmail} target="_blank">
<Typography.Link
data-testid="app-support-email"
href={`mailto:${appData?.supportEmail}`}
target="_blank">
<Space>{t('label.get-app-support')}</Space>
</Typography.Link>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(<MarketPlaceAppDetails />);

await waitForElementToBeRemoved(() => screen.getByText('Loader'));

expect(screen.getByTestId('app-support-email')).toHaveAttribute(
'href',
'mailto:support@email.com'
);
});
});

0 comments on commit 3790cc8

Please sign in to comment.