-
Notifications
You must be signed in to change notification settings - Fork 67
/
DeepLink.tsx
39 lines (36 loc) 路 1.24 KB
/
DeepLink.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {Typography} from 'antd';
import {FramedCodeBlock} from 'components/CodeBlock';
import * as S from './DeepLink.styled';
import Controls from './Controls';
import {IMethodProps} from '../../RunDetailAutomateMethods';
import useDeepLink from './hooks/useDeepLink';
const DeepLink = ({test, environmentId, run: {environment}}: IMethodProps) => {
const {deepLink, onGetDeepLink} = useDeepLink();
return (
<S.Container>
<S.TitleContainer>
<S.Title>Deep Link Usage</S.Title>
</S.TitleContainer>
<Typography.Paragraph>
The deep link below enables you to run this test via a browser. It is useful as you can create dashboards to run
particular tests interactively.
</Typography.Paragraph>
<FramedCodeBlock
title="The deep link structure:"
language="bash"
value={deepLink}
minHeight="80px"
maxHeight="80px"
actions={
<a target="_blank" href={deepLink}>
<S.TryItButton ghost type="primary">
Try it
</S.TryItButton>
</a>
}
/>
<Controls onChange={onGetDeepLink} environment={environment} test={test} environmentId={environmentId} />
</S.Container>
);
};
export default DeepLink;