Skip to content

Commit 2e64705

Browse files
committed
fix: styling and address pr comments
1 parent fe398f7 commit 2e64705

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

packages/frontend/src/components/FlowStepTestController/CheckAgainButton.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function CheckAgainButton(props: CheckAgainButtonProps) {
3939
colorScheme={isUnstyledInfobox ? 'primary' : 'black'}
4040
size="sm"
4141
isDisabled={isDisabled}
42+
data-test="check-again-button"
4243
>
4344
Check step again
4445
</Button>
@@ -125,13 +126,12 @@ function FormSGCheckAgainButton(props: CheckAgainButtonProps) {
125126

126127
const onTestClick = useCallback(() => {
127128
if (!lastTestSubmissionDate) {
128-
return onClick
129+
return onClick()
129130
}
130131
if (isMock) {
131-
onClick({ preferMock: true })
132-
} else {
133-
onClick({ preferMock: false })
132+
return onClick({ preferMock: true })
134133
}
134+
return onClick({ preferMock: false })
135135
}, [lastTestSubmissionDate, isMock, onClick])
136136

137137
return (
@@ -142,7 +142,12 @@ function FormSGCheckAgainButton(props: CheckAgainButtonProps) {
142142
variant={isTransparentInfobox ? 'solid' : 'outline'}
143143
colorScheme={isTransparentInfobox ? 'primary' : 'black'}
144144
>
145-
<Button onClick={onTestClick} isLoading={isLoading} gap={2}>
145+
<Button
146+
onClick={onTestClick}
147+
isLoading={isLoading}
148+
gap={2}
149+
data-test="formsg-check-again-button"
150+
>
146151
{buttonText}
147152
</Button>
148153
{lastTestSubmissionDate && (
@@ -151,6 +156,7 @@ function FormSGCheckAgainButton(props: CheckAgainButtonProps) {
151156
as={IconButton}
152157
icon={<BiChevronDown />}
153158
isLoading={isLoading}
159+
data-test="formsg-check-again-button-dropdown"
154160
/>
155161
<MenuList maxW="350px">
156162
<FormSGMenuItem

packages/frontend/src/components/FlowStepTestController/TestResult.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function TestResult(props: TestResultsProps): JSX.Element {
8484
return (
8585
<Box w="100%">
8686
{isMock && (
87-
<Infobox variant="info">
87+
<Infobox variant="info" style={{ paddingLeft: '24px' }}>
8888
<Text>{getMockDataMessage(selectedActionOrTrigger)}</Text>
8989
</Infobox>
9090
)}

0 commit comments

Comments
 (0)