Merge pull request #2030 from automatisch/AUT-1132

fix: prevent resetting test data until data is loaded
This commit is contained in:
Ali BARIN
2024-08-26 11:37:37 +02:00
committed by GitHub

View File

@@ -62,11 +62,11 @@ function TestSubstep(props) {
React.useEffect( React.useEffect(
function resetTestDataOnSubstepToggle() { function resetTestDataOnSubstepToggle() {
if (!expanded) { if (!expanded && !loading) {
reset(); reset();
} }
}, },
[expanded, reset], [expanded, reset, loading],
); );
const handleSubmit = React.useCallback(async () => { const handleSubmit = React.useCallback(async () => {
@@ -118,7 +118,11 @@ function TestSubstep(props) {
)} )}
{hasNoOutput && ( {hasNoOutput && (
<Alert data-test="flow-test-substep-no-output" severity="warning" sx={{ mb: 1, width: '100%' }}> <Alert
data-test="flow-test-substep-no-output"
severity="warning"
sx={{ mb: 1, width: '100%' }}
>
<AlertTitle sx={{ fontWeight: 700 }}> <AlertTitle sx={{ fontWeight: 700 }}>
{formatMessage('flowEditor.noTestDataTitle')} {formatMessage('flowEditor.noTestDataTitle')}
</AlertTitle> </AlertTitle>