Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolik170 committed Nov 21, 2023
1 parent c06ce38 commit 8d94ac8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/setup-interceptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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: '[email protected]' } })

expect(inputEmail.value).toBe('[email protected]')

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)
Expand Down

0 comments on commit 8d94ac8

Please sign in to comment.