-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: RoomSettingHeader에 Modal Context 적용 #272
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { screen, waitFor } from '@testing-library/react'; | ||
import { userEvent } from '@testing-library/user-event'; | ||
|
||
import { RoomSettingHeader } from './Header'; | ||
|
||
import { customRenderWithIsMaster } from '@/utils/test-utils'; | ||
|
||
describe('Header 테스트', () => { | ||
it('방 설정 버튼을 클릭했을 때, 방 설정 모달이 뜬다.', async () => { | ||
const user = userEvent.setup(); | ||
customRenderWithIsMaster(<RoomSettingHeader title="밸런스 게임" />, true); | ||
|
||
const roomSettingButton = await screen.findByAltText('방 설정'); | ||
await user.click(roomSettingButton); | ||
|
||
await waitFor(() => { | ||
const category = screen.getByText('카테고리'); | ||
expect(category).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters