mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-20 13:23:52 +00:00
Show preview alert only for preview apps (#15926)
* show alert for only preview apps * update tests
This commit is contained in:
parent
67f01625b0
commit
92962c43ae
@ -143,7 +143,6 @@ const MarketPlaceAppDetails = () => {
|
|||||||
{t('label.browse-app-plural')}
|
{t('label.browse-app-plural')}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<div className="flex-center m-t-md">
|
<div className="flex-center m-t-md">
|
||||||
<AppLogo appName={appData?.fullyQualifiedName ?? ''} />
|
<AppLogo appName={appData?.fullyQualifiedName ?? ''} />
|
||||||
</div>
|
</div>
|
||||||
@ -159,6 +158,7 @@ const MarketPlaceAppDetails = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
{isPreviewApp && (
|
||||||
<Alert
|
<Alert
|
||||||
className="m-t-md text-xs d-flex items-start p-xs"
|
className="m-t-md text-xs d-flex items-start p-xs"
|
||||||
message={
|
message={
|
||||||
@ -182,14 +182,13 @@ const MarketPlaceAppDetails = () => {
|
|||||||
}
|
}
|
||||||
type="info"
|
type="info"
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<div className="m-t-md">
|
<div className="m-t-md">
|
||||||
<CheckMarkIcon className="v-middle m-r-xss" />
|
<CheckMarkIcon className="v-middle m-r-xss" />
|
||||||
<Typography.Text className="text-xs font-medium text-grey-muted">
|
<Typography.Text className="text-xs font-medium text-grey-muted">
|
||||||
{t('message.marketplace-verify-msg')}
|
{t('message.marketplace-verify-msg')}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Space className="p-t-lg" direction="vertical" size={8}>
|
<Space className="p-t-lg" direction="vertical" size={8}>
|
||||||
<Typography.Text>
|
<Typography.Text>
|
||||||
{appData?.supportEmail && (
|
{appData?.supportEmail && (
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
|
queryByTestId,
|
||||||
render,
|
render,
|
||||||
screen,
|
screen,
|
||||||
waitForElementToBeRemoved,
|
waitForElementToBeRemoved,
|
||||||
@ -95,7 +96,7 @@ jest.mock('../AppLogo/AppLogo.component', () =>
|
|||||||
|
|
||||||
describe('MarketPlaceAppDetails component', () => {
|
describe('MarketPlaceAppDetails component', () => {
|
||||||
it('should render all necessary elements if app details fetch successfully', async () => {
|
it('should render all necessary elements if app details fetch successfully', async () => {
|
||||||
render(<MarketPlaceAppDetails />);
|
const { container } = render(<MarketPlaceAppDetails />);
|
||||||
|
|
||||||
await waitForElementToBeRemoved(() => screen.getByText('Loader'));
|
await waitForElementToBeRemoved(() => screen.getByText('Loader'));
|
||||||
|
|
||||||
@ -116,6 +117,10 @@ describe('MarketPlaceAppDetails component', () => {
|
|||||||
expect(screen.getByText('label.privacy-policy')).toBeInTheDocument();
|
expect(screen.getByText('label.privacy-policy')).toBeInTheDocument();
|
||||||
expect(screen.getByText('label.get-app-support')).toBeInTheDocument();
|
expect(screen.getByText('label.get-app-support')).toBeInTheDocument();
|
||||||
|
|
||||||
|
const appName = queryByTestId(container, 'appName');
|
||||||
|
|
||||||
|
expect(appName).not.toBeInTheDocument();
|
||||||
|
|
||||||
// actions check
|
// actions check
|
||||||
userEvent.click(
|
userEvent.click(
|
||||||
screen.getByRole('button', { name: 'left label.browse-app-plural' })
|
screen.getByRole('button', { name: 'left label.browse-app-plural' })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user