test: search for proper snackbar on user create error

This commit is contained in:
Jakub P.
2024-09-19 00:17:05 +02:00
committed by Faruk AYDIN
parent e126066132
commit 3408be2840
3 changed files with 11 additions and 9 deletions

View File

@@ -51,6 +51,14 @@ export default function CreateUser() {
},
});
} catch (error) {
enqueueSnackbar(formatMessage('createUser.error'), {
variant: 'error',
persist: true,
SnackbarProps: {
'data-test': 'snackbar-error',
},
});
throw new Error('Failed while creating!');
}
};