feat: add test for orders

This commit is contained in:
2025-02-16 11:31:05 +03:00
parent 52fec13377
commit 56f65fbd3a
14 changed files with 16255 additions and 15270 deletions

View File

@@ -28,27 +28,28 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
console.error('Error caught by ErrorBoundary:', error, errorInfo);
console.error('4545');
this.setState({ error, errorInfo });
}
render() {
const { hasError } = this.state;
//TODO: добавить анимацию после залива 404 страницы
//TODO: может сделать обертку для хука, чтоб язык менялся без перезагрузки
if (hasError) {
return (
<Center minH='100vh'>
<Center minH='100vh' data-testid='error-boundary'>
<VStack spacing={4} textAlign='center'>
<Heading as='h1' size='2xl'>
<Heading as='h1' size='2xl' data-testid='error-title'>
{i18next.t('~:dry-wash.errorBoundary.title')}
</Heading>
<Text fontSize='lg'>
<Text fontSize='lg' data-testid='error-description'>
{i18next.t('~:dry-wash.errorBoundary.description')}
</Text>
<Button
colorScheme='teal'
size='lg'
variant='outline'
data-testid='error-reload-button'
onClick={() => window.location.reload()}
>
{i18next.t('~:dry-wash.errorBoundary.button.reload')}