feat(TestSubstep): put some space between info and test output

This commit is contained in:
Ali BARIN
2022-12-08 22:19:00 +01:00
parent ba1e1ef20c
commit 6382325280
2 changed files with 8 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
{!!error?.graphQLErrors?.length && ( {!!error?.graphQLErrors?.length && (
<Alert <Alert
severity="error" severity="error"
sx={{ mb: 1, fontWeight: 500, width: '100%' }} sx={{ mb: 2, fontWeight: 500, width: '100%' }}
> >
{serializeErrors(error.graphQLErrors).map((error: any) => ( {serializeErrors(error.graphQLErrors).map((error: any) => (
<div>{error.message}</div> <div>{error.message}</div>
@@ -116,7 +116,9 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
</Alert> </Alert>
)} )}
{step.webhookUrl && <WebhookUrlInfo webhookUrl={step.webhookUrl} />} {step.webhookUrl && (
<WebhookUrlInfo webhookUrl={step.webhookUrl} sx={{ mb: 2 }} />
)}
{hasNoOutput && ( {hasNoOutput && (
<Alert severity="warning" sx={{ mb: 1, width: '100%' }}> <Alert severity="warning" sx={{ mb: 1, width: '100%' }}>

View File

@@ -1,6 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
import type { AlertProps } from '@mui/material/Alert';
import { generateExternalLink } from '../../helpers/translation-values'; import { generateExternalLink } from '../../helpers/translation-values';
import { WEBHOOK_DOCS } from '../../config/urls'; import { WEBHOOK_DOCS } from '../../config/urls';
@@ -9,13 +10,13 @@ import { Alert } from './style';
type WebhookUrlInfoProps = { type WebhookUrlInfoProps = {
webhookUrl: string; webhookUrl: string;
}; } & AlertProps;
function WebhookUrlInfo(props: WebhookUrlInfoProps): React.ReactElement { function WebhookUrlInfo(props: WebhookUrlInfoProps): React.ReactElement {
const { webhookUrl } = props; const { webhookUrl, ...alertProps } = props;
return ( return (
<Alert icon={false} color="info"> <Alert icon={false} color="info" {...alertProps}>
<Typography variant="body2" textAlign="center"> <Typography variant="body2" textAlign="center">
<FormattedMessage id="webhookUrlInfo.title" /> <FormattedMessage id="webhookUrlInfo.title" />
</Typography> </Typography>