diff --git a/src/services/setup-interceptors.ts b/src/services/setup-interceptors.ts index ba1a8f8cb7..bd9b98433e 100644 --- a/src/services/setup-interceptors.ts +++ b/src/services/setup-interceptors.ts @@ -23,7 +23,7 @@ export const setupInterceptors = (): void => { try { return await axiosClient.request(originalRequest) } catch (e) { - void authService.endpoints.logout.initiate() + return authService.endpoints.logout.initiate() } } return Promise.reject(error) diff --git a/tests/unit/containers/guest-home-page/signup-dialog/SignupDialog.spec.jsx b/tests/unit/containers/guest-home-page/signup-dialog/SignupDialog.spec.jsx index d61099cd54..8352230eec 100644 --- a/tests/unit/containers/guest-home-page/signup-dialog/SignupDialog.spec.jsx +++ b/tests/unit/containers/guest-home-page/signup-dialog/SignupDialog.spec.jsx @@ -1,4 +1,4 @@ -import { vi } from 'vitest' +import { expect, vi } from 'vitest' import { screen, fireEvent, waitFor } from '@testing-library/react' import SignupDialog from '~/containers/guest-home-page/signup-dialog/SignupDialog' import { renderWithProviders } from '~tests/test-utils' @@ -86,23 +86,33 @@ describe('Signup dialog test', () => { fireEvent.change(inputFirstName, { target: { value: 'test' } }) + expect(inputFirstName.value).toBe('test') + const inputLastName = screen.getByLabelText(/common.labels.lastName/i) fireEvent.change(inputLastName, { target: { value: 'test' } }) + expect(inputFirstName.value).toBe('test') + const inputEmail = screen.getByLabelText(/common.labels.email/i) fireEvent.change(inputEmail, { target: { value: 'test@gmail.com' } }) + expect(inputEmail.value).toBe('test@gmail.com') + const inputPassword = screen.getByLabelText(/common.labels.password/i) fireEvent.change(inputPassword, { target: { value: '12345678a/A' } }) + expect(inputPassword.value).toBe('12345678a/A') + const inputConfirmPassword = screen.getByLabelText( /common.labels.confirmPassword/i ) fireEvent.change(inputConfirmPassword, { target: { value: '12345678a/A' } }) + expect(inputConfirmPassword.value).toBe('12345678a/A') + const checkbox = screen.getByRole('checkbox') fireEvent.click(checkbox)