Skip to content

Commit c14aa01

Browse files
authored
Fix missing test step viewer labels (#2292)
Fixes OPS-4318 ## Additional Notes From `dev` env <img width="484" height="358" alt="Screenshot 2026-05-14 at 5 10 37 PM" src="https://github.com/user-attachments/assets/03f16bf5-6a5e-49fa-8d82-8be1b0809f14" /> <img width="484" height="358" alt="Screenshot 2026-05-14 at 5 10 49 PM" src="https://github.com/user-attachments/assets/ea3e2a1b-dbfb-4d08-bec2-2d8ff6ca70dc" />
1 parent ba2ba7c commit c14aa01

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

packages/ui-components/src/components/test-step-data-viewer/test-step-data-viewer.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { t } from 'i18next';
21
import { useMemo, useState } from 'react';
2+
import { useTranslation } from 'react-i18next';
33
import { Theme } from '../../lib/theme';
44
import { JsonViewer } from '../json-viewer/json-viewer';
55
import { ToggleSwitch } from '../toggle-switch/toggle-switch';
@@ -19,19 +19,6 @@ const JsonViewType = {
1919
Output: 'Output',
2020
};
2121

22-
const VIEW_INPUT_OPTIONS = [
23-
{
24-
value: JsonViewType.Input,
25-
label: t('Input'),
26-
tooltipText: t('View input data'),
27-
},
28-
{
29-
value: JsonViewType.Output,
30-
label: t('Output'),
31-
tooltipText: t('View output data'),
32-
},
33-
];
34-
3522
const TestStepDataViewer = ({
3623
inputJson,
3724
outputJson,
@@ -41,6 +28,19 @@ const TestStepDataViewer = ({
4128
editorClassName,
4229
containerClassName,
4330
}: TestStepDataViewerProps) => {
31+
const { t } = useTranslation();
32+
const VIEW_INPUT_OPTIONS = [
33+
{
34+
value: JsonViewType.Input,
35+
label: t('Input'),
36+
tooltipText: t('View input data'),
37+
},
38+
{
39+
value: JsonViewType.Output,
40+
label: t('Output'),
41+
tooltipText: t('View output data'),
42+
},
43+
];
4444
const [selectedViewType, setSelectedViewType] = useState<string>(
4545
JsonViewType.Output,
4646
);

0 commit comments

Comments
 (0)