diff --git a/src/app/(user)/mypage/page.test.tsx b/src/app/(user)/mypage/page.test.tsx index 201d03fa..51c3aad2 100644 --- a/src/app/(user)/mypage/page.test.tsx +++ b/src/app/(user)/mypage/page.test.tsx @@ -36,7 +36,7 @@ const renderWithQueryClient = async (component: React.ReactElement) => { await act(async () => { renderResult = render( - + {component} , @@ -84,8 +84,9 @@ describe('마이 페이지 테스트', () => { test('설정 화면이 올바르게 표시되는지 테스트', async () => { await renderWithQueryClient(); - expect(await screen.findByText('알림 받기')).toBeInTheDocument(); - expect(screen.getByText('로그아웃')).toBeInTheDocument(); + // expect(await screen.findByText('알림 받기')).toBeInTheDocument(); + expect(await screen.findByText('로그아웃')).toBeInTheDocument(); + // expect(screen.getByText('로그아웃')).toBeInTheDocument(); expect(screen.getByText('회원탈퇴')).toBeInTheDocument(); }); @@ -102,19 +103,19 @@ describe('마이 페이지 테스트', () => { }); }); - test('알림 설정이 정상적으로 동작하는지 테스트', async () => { - const user = userEvent.setup(); + // test('알림 설정이 정상적으로 동작하는지 테스트', async () => { + // const user = userEvent.setup(); - const updateNotificationSpy = jest.spyOn(API.userService, 'updateMyNotification'); - await renderWithQueryClient(); + // const updateNotificationSpy = jest.spyOn(API.userService, 'updateMyNotification'); + // await renderWithQueryClient(); - const notificationButton = await screen.findByRole('button', { name: '알림 받기' }); - await user.click(notificationButton); + // const notificationButton = await screen.findByRole('button', { name: '알림 받기' }); + // await user.click(notificationButton); - await waitFor(() => { - expect(updateNotificationSpy).toHaveBeenCalled(); - }); - }); + // await waitFor(() => { + // expect(updateNotificationSpy).toHaveBeenCalled(); + // }); + // }); test('로그아웃이 정상적으로 동작하는지 테스트', async () => { const user = userEvent.setup(); diff --git a/src/components/pages/user/mypage/mypage-setting/index.tsx b/src/components/pages/user/mypage/mypage-setting/index.tsx index f61ca9fc..ce35258b 100644 --- a/src/components/pages/user/mypage/mypage-setting/index.tsx +++ b/src/components/pages/user/mypage/mypage-setting/index.tsx @@ -1,27 +1,27 @@ 'use client'; import { useLogout, useWithdraw } from '@/hooks/use-auth'; -import { useUpdateMyNotification } from '@/hooks/use-user/use-user-notification'; +// import { useUpdateMyNotification } from '@/hooks/use-user/use-user-notification'; import { User } from '@/types/service/user'; -import { MyPageActionButton, MyPageToggleButton } from '../mypage-setting-button'; +import { MyPageActionButton, MyPageToggleButton as _ } from '../mypage-setting-button'; interface Props { user: User; } -export const MyPageSetting = ({ user }: Props) => { - const { mutate } = useUpdateMyNotification(); +export const MyPageSetting = ({ user: _ }: Props) => { + // const { mutate } = useUpdateMyNotification(); const logout = useLogout(); const withdraw = useWithdraw(); return (
- mutate({ isNotificationEnabled: !user.isNotificationEnabled })} > 알림 받기 - + */} 로그아웃 회원탈퇴