diff --git a/web/src/components/Router/Router.tsx b/web/src/components/Router/Router.tsx
index dc0e3db8c5..e24a8ae6a9 100644
--- a/web/src/components/Router/Router.tsx
+++ b/web/src/components/Router/Router.tsx
@@ -8,7 +8,8 @@ import RunDetail from 'pages/RunDetail';
import Settings from 'pages/Settings';
import Test from 'pages/Test';
import Transaction from 'pages/Transaction';
-import TransactionRunDetail from 'pages/TransactionRunDetail';
+import TransactionRunOverview from 'pages/TransactionRunOverview';
+import TransactionRunAutomate from 'pages/TransactionRunAutomate';
import AutomatedTestRun from 'pages/AutomatedTestRun';
import Env from 'utils/Env';
@@ -24,15 +25,14 @@ const Router = () => (
} />
} />
-
- }>
- } />
-
-
+ } />
+ } />
} />
} />
- } />
+ } />
+ } />
+ } />
} />
diff --git a/web/src/components/RunActionsMenu/RunActionsMenu.tsx b/web/src/components/RunActionsMenu/RunActionsMenu.tsx
index ed6f573ff6..21f77fed57 100644
--- a/web/src/components/RunActionsMenu/RunActionsMenu.tsx
+++ b/web/src/components/RunActionsMenu/RunActionsMenu.tsx
@@ -17,9 +17,7 @@ interface IProps {
const RunActionsMenu = ({resultId, testId, transactionId, transactionRunId, isRunView = false}: IProps) => {
const {onJUnit} = useFileViewerModal();
-
const navigate = useNavigate();
-
const onDelete = useDeleteResourceRun({id: testId, isRunView, type: ResourceType.Test});
return (
diff --git a/web/src/components/RunCard/TransactionRunCard.tsx b/web/src/components/RunCard/TransactionRunCard.tsx
index 092b75185f..c2f4aed899 100644
--- a/web/src/components/RunCard/TransactionRunCard.tsx
+++ b/web/src/components/RunCard/TransactionRunCard.tsx
@@ -72,7 +72,7 @@ const TransactionRunCard = ({
)}
-
+
diff --git a/web/src/components/RunDetailAutomate/RunDetailAutomate.styled.ts b/web/src/components/RunDetailAutomate/RunDetailAutomate.styled.ts
index ba4593a586..e5b4532d62 100644
--- a/web/src/components/RunDetailAutomate/RunDetailAutomate.styled.ts
+++ b/web/src/components/RunDetailAutomate/RunDetailAutomate.styled.ts
@@ -8,21 +8,18 @@ export const Container = styled.div`
export const Section = styled.div`
flex: 1;
-`;
-
-export const SectionLeft = styled(Section)`
background-color: ${({theme}) => theme.color.white};
overflow-y: scroll;
- z-index: 1;
flex-basis: 50%;
max-width: 50vw;
`;
+export const SectionLeft = styled(Section)`
+ z-index: 1;
+`;
+
export const SectionRight = styled(Section)`
- background-color: ${({theme}) => theme.color.white};
border-left: 1px solid rgba(3, 24, 73, 0.1);
- overflow-y: scroll;
z-index: 2;
- flex-basis: 50%;
- max-width: 50vw;
+ padding: 24px;
`;
diff --git a/web/src/components/RunDetailAutomate/RunDetailAutomate.tsx b/web/src/components/RunDetailAutomate/RunDetailAutomate.tsx
index cbc8505a1e..f72ef864d9 100644
--- a/web/src/components/RunDetailAutomate/RunDetailAutomate.tsx
+++ b/web/src/components/RunDetailAutomate/RunDetailAutomate.tsx
@@ -1,10 +1,15 @@
import {snakeCase} from 'lodash';
-import Test from 'models/Test.model';
import {useState} from 'react';
+import RunDetailAutomateDefinition from 'components/RunDetailAutomateDefinition';
+import RunDetailAutomateMethods from 'components/RunDetailAutomateMethods';
+import CliCommand from 'components/RunDetailAutomateMethods/methods/CLICommand';
+import DeepLink from 'components/RunDetailAutomateMethods/methods/DeepLink';
+import {CLI_RUNNING_TESTS_URL} from 'constants/Common.constants';
+import Test from 'models/Test.model';
import TestRun from 'models/TestRun.model';
+import {useEnvironment} from 'providers/Environment/Environment.provider';
+import {ResourceType} from 'types/Resource.type';
import * as S from './RunDetailAutomate.styled';
-import RunDetailAutomateDefinition from '../RunDetailAutomateDefinition';
-import RunDetailAutomateMethods from '../RunDetailAutomateMethods/RunDetailAutomateMethods';
interface IProps {
test: Test;
@@ -13,14 +18,43 @@ interface IProps {
const RunDetailAutomate = ({test, run}: IProps) => {
const [fileName, setFileName] = useState(`${snakeCase(test.name)}.yaml`);
+ const {selectedEnvironment: {id: environmentId} = {}} = useEnvironment();
return (
-
+
-
+
+ ),
+ },
+ {
+ id: 'deeplink',
+ label: 'Deep Link',
+ children: ,
+ },
+ ]}
+ />
);
diff --git a/web/src/components/RunDetailAutomateDefinition/RunDetailAutomateDefinition.tsx b/web/src/components/RunDetailAutomateDefinition/RunDetailAutomateDefinition.tsx
index 9f4ffc236c..3a6c5c942c 100644
--- a/web/src/components/RunDetailAutomateDefinition/RunDetailAutomateDefinition.tsx
+++ b/web/src/components/RunDetailAutomateDefinition/RunDetailAutomateDefinition.tsx
@@ -1,21 +1,23 @@
-import {useCallback, useEffect} from 'react';
import {DownloadOutlined} from '@ant-design/icons';
import {Button} from 'antd';
-import {downloadFile} from 'utils/Common';
+import {capitalize} from 'lodash';
+import {useCallback, useEffect} from 'react';
+import {FramedCodeBlock} from 'components/CodeBlock';
+import InputOverlay from 'components/InputOverlay/InputOverlay';
import useDefinitionFile from 'hooks/useDefinitionFile';
import {ResourceType} from 'types/Resource.type';
-import Test from 'models/Test.model';
+import {downloadFile} from 'utils/Common';
import * as S from './RunDetailAutomateDefinition.styled';
-import {FramedCodeBlock} from '../CodeBlock';
-import InputOverlay from '../InputOverlay/InputOverlay';
interface IProps {
- test: Test;
- onFileNameChange(value: string): void;
+ id: string;
+ version: number;
+ resourceType: ResourceType;
fileName: string;
+ onFileNameChange(value: string): void;
}
-const RunDetailAutomateDefinition = ({test: {id, version}, onFileNameChange, fileName}: IProps) => {
+const RunDetailAutomateDefinition = ({id, version, resourceType, fileName, onFileNameChange}: IProps) => {
const {definition, loadDefinition} = useDefinitionFile();
const onDownload = useCallback(() => {
@@ -23,12 +25,12 @@ const RunDetailAutomateDefinition = ({test: {id, version}, onFileNameChange, fil
}, [definition, fileName]);
useEffect(() => {
- loadDefinition(ResourceType.Test, id, version);
- }, [id, loadDefinition, version]);
+ loadDefinition(resourceType, id, version);
+ }, [id, loadDefinition, resourceType, version]);
return (
- Test Definition
+ {capitalize(resourceType)} Definition
diff --git a/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.styled.ts b/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.styled.ts
index 8318ea9617..df84c75b05 100644
--- a/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.styled.ts
+++ b/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.styled.ts
@@ -1,12 +1,10 @@
import {Typography} from 'antd';
import styled from 'styled-components';
-import noResultsIcon from 'assets/SpanAssertionsEmptyState.svg';
export const Container = styled.div`
display: flex;
flex-direction: column;
height: 100%;
- padding: 24px;
`;
export const TitleContainer = styled.div`
@@ -44,99 +42,3 @@ export const TabsContainer = styled.div`
padding: 0;
}
`;
-
-export const StatusText = styled(Typography.Text)`
- && {
- font-size: ${({theme}) => theme.size.md};
- }
-`;
-
-export const LoadingResponseBody = styled.div`
- margin-top: 24px;
- display: flex;
- flex-direction: column;
- justify-items: center;
- gap: 16px;
- padding: 0.4em 0.6em;
-`;
-
-export const TextHolder = styled.div<{$width?: number}>`
- @keyframes skeleton-loading {
- 0% {
- background-color: hsl(200, 20%, 80%);
- }
- 100% {
- background-color: hsl(200, 20%, 95%);
- }
- }
-
- animation: skeleton-loading 1s linear infinite alternate;
- height: 16px;
- border-radius: 2px;
- width: ${({$width = 100}) => $width}%;
-`;
-
-export const TextContainer = styled.div`
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
-`;
-
-export const Text = styled(Typography.Text)`
- font-size: ${({theme}) => theme.size.sm};
-`;
-
-export const HeadersList = styled.div`
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 16px 0;
-`;
-
-export const Actions = styled.div`
- display: flex;
- justify-content: flex-end;
- align-items: center;
- margin-top: 16px;
- gap: 10px;
-`;
-
-export const ResponseEnvironmentContainer = styled.div`
- padding: 16px 0;
-`;
-
-export const EmptyContainer = styled.div`
- align-items: center;
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-top: 100px;
- text-align: center;
-`;
-
-export const EmptyIcon = styled.img.attrs({
- src: noResultsIcon,
-})`
- height: auto;
- margin-bottom: 16px;
- width: 90px;
-`;
-
-export const EmptyText = styled(Typography.Text)`
- color: ${({theme}) => theme.color.textSecondary};
-`;
-
-export const EmptyTitle = styled(Typography.Title).attrs({level: 3})``;
-
-export const ResponseBodyContainer = styled.div`
- display: flex;
- width: 100%;
-`;
-
-export const ResponseBodyContent = styled.div`
- flex: 1;
-`;
-
-export const ResponseBodyActions = styled.div`
- margin: 16px 0 0 4px;
-`;
diff --git a/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.tsx b/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.tsx
index 08fd5d0666..a1a4a430bb 100644
--- a/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.tsx
+++ b/web/src/components/RunDetailAutomateMethods/RunDetailAutomateMethods.tsx
@@ -1,48 +1,41 @@
import {Tabs} from 'antd';
import {useSearchParams} from 'react-router-dom';
-import Test from 'models/Test.model';
-import TestRun from 'models/TestRun.model';
-import {useEnvironment} from 'providers/Environment/Environment.provider';
-import CliCommand from './methods/CLICommand';
+import {ResourceType} from 'types/Resource.type';
import * as S from './RunDetailAutomateMethods.styled';
-import DeepLink from './methods/DeepLink/DeepLink';
-const TabsKeys = {
- CLI: 'cli',
- DeepLink: 'deeplink',
-};
+interface IProps {
+ resourceType: ResourceType;
+ methods?: IMethodProps[];
+}
-export interface IMethodProps {
- environmentId?: string;
- test: Test;
- run: TestRun;
- fileName?: string;
+interface IMethodProps {
+ id: string;
+ label: string;
+ children: React.ReactNode;
}
-const RunDetailAutomateMethods = ({test, run, fileName}: IMethodProps) => {
+const RunDetailAutomateMethods = ({resourceType, methods = []}: IProps) => {
const [query, updateQuery] = useSearchParams();
- const {selectedEnvironment: {id: environmentId} = {}} = useEnvironment();
return (
- Running Techniques Methods to automate the running of this test
+ Running Techniques
+ Methods to automate the running of this {resourceType}
{
- updateQuery([['tab', newTab]]);
+ onChange={activeKey => {
+ updateQuery([['tab', activeKey]]);
}}
>
-
-
-
-
-
-
+ {methods.map(({id, label, children}) => (
+
+ {children}
+
+ ))}
diff --git a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx
index cb42a4817d..d990bf60ab 100644
--- a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx
+++ b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/CliCommand.tsx
@@ -1,19 +1,26 @@
-import {FramedCodeBlock} from 'components/CodeBlock';
import {ReadOutlined} from '@ant-design/icons';
-import {CLI_RUNNING_TESTS_URL} from 'constants/Common.constants';
+import {FramedCodeBlock} from 'components/CodeBlock';
+import {ResourceType} from 'types/Resource.type';
import * as S from './CliCommand.styled';
import Controls from './Controls';
import useCliCommand from './hooks/useCliCommand';
-import {IMethodProps} from '../../RunDetailAutomateMethods';
-const CLiCommand = ({test, environmentId, fileName = ''}: IMethodProps) => {
+interface IProps {
+ id: string;
+ environmentId?: string;
+ fileName?: string;
+ resourceType: ResourceType;
+ docsUrl?: string;
+}
+
+const CLiCommand = ({id, environmentId, fileName = '', resourceType, docsUrl}: IProps) => {
const {command, onGetCommand} = useCliCommand();
return (
CLI Configuration
-
+
@@ -24,7 +31,13 @@ const CLiCommand = ({test, environmentId, fileName = ''}: IMethodProps) => {
minHeight="100px"
maxHeight="100px"
/>
-
+
);
};
diff --git a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Controls.tsx b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Controls.tsx
index 8aaf3d0c3a..1aa89a1d96 100644
--- a/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Controls.tsx
+++ b/web/src/components/RunDetailAutomateMethods/methods/CLICommand/Controls.tsx
@@ -1,14 +1,15 @@
import {Form, Radio, Typography} from 'antd';
import {toUpper} from 'lodash';
import {useEffect, useMemo} from 'react';
-import Test from 'models/Test.model';
import {CliCommandFormat, CliCommandOption, TCliCommandConfig} from 'services/CliCommand.service';
+import {ResourceType} from 'types/Resource.type';
import * as S from './CliCommand.styled';
import SwitchControl from './SwitchControl';
import {defaultOptions} from './hooks/useCliCommand';
interface IOptionsMetadataParams {
isEnvironmentSelected: boolean;
+ resourceType: ResourceType;
}
interface IOptionsMetadata {
label: string;
@@ -18,10 +19,11 @@ interface IOptionsMetadata {
function getOptionsMetadata({
isEnvironmentSelected,
+ resourceType,
}: IOptionsMetadataParams): Record {
return {
- [CliCommandOption.UseId]: {label: 'Use test ID instead of file'},
- [CliCommandOption.SkipResultWait]: {label: 'Skip waiting for test to complete'},
+ [CliCommandOption.UseId]: {label: `Use ${resourceType} ID instead of file`},
+ [CliCommandOption.SkipResultWait]: {label: `Skip waiting for ${resourceType} to complete`},
[CliCommandOption.UseHostname]: {label: 'Specify Tracetest server hostname'},
[CliCommandOption.UseCurrentEnvironment]: {
label: 'Use selected environment',
@@ -35,26 +37,31 @@ function getOptionsMetadata({
interface IProps {
onChange(cmdConfig: TCliCommandConfig): void;
- test: Test;
+ id: string;
environmentId?: string;
fileName: string;
+ resourceType: ResourceType;
}
-const Controls = ({onChange, test, environmentId, fileName}: IProps) => {
+const Controls = ({onChange, id, environmentId, fileName, resourceType}: IProps) => {
const [form] = Form.useForm();
const options = Form.useWatch('options', form);
const format = Form.useWatch('format', form);
- const optionsMetadata = useMemo(() => getOptionsMetadata({isEnvironmentSelected: !!environmentId}), [environmentId]);
+ const optionsMetadata = useMemo(
+ () => getOptionsMetadata({isEnvironmentSelected: !!environmentId, resourceType}),
+ [environmentId, resourceType]
+ );
useEffect(() => {
onChange({
options: options ?? defaultOptions,
format: format ?? CliCommandFormat.Pretty,
- test,
+ id,
environmentId,
fileName,
+ resourceType,
});
- }, [environmentId, fileName, format, onChange, options, test]);
+ }, [environmentId, fileName, format, onChange, options, id, resourceType]);
return (