-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/sign up form test #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
๋์ ๋ฆฌ๋ทฐ ์์ /์ญ์ ๋๊ด์ ์ ๋ฐ์ดํธ ์ ์ฉ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ๐
__esModule: true, | ||
default: ({ onComplete }: { onComplete: (data: PostAddress) => void }) => ( | ||
<div data-testid="daum-postcode"> | ||
<button onClick={() => onComplete({ zonecode: '12345', address: 'Seoul, Korea' })}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zoneCode์ Seoul, Korea๋ ์์ ๋ณ์๋ก ๊ด๋ฆฌํด์ฃผ๋ฉด ์ข์๊ฒ ๊ฐ์์
it('renders all input fields with appropriate data-testid attributes', () => { | ||
render(<SignUpForm onSubmit={mockOnSubmit} onValidChange={mockOnValidChange} />); | ||
const fields = [ | ||
'name', | ||
'email', | ||
'password', | ||
'confirmPassword', | ||
'phone', | ||
'postalCode', | ||
'streetAddress', | ||
'detailAddress', | ||
]; | ||
fields.forEach((testId) => expect(screen.getByTestId(testId)).toBeInTheDocument()); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ช ํ ๊ฒ์ ๊ผญ ๋ค ๋ฃ์ง ์์๋ ๋ ๊ฒ ๊ฐ์ต๋๋ค..!
feat/sign-up-form-test
๐Part
๐ ์์ ๋ด์ฉ
๋ชจ๋ ์ ๋ ฅ ํ๋๊ฐ data-testid ์์ฑ์ผ๋ก ๋ ๋๋ง๋๋์ง ํ์ธ
์๋ชป๋ ์ ๋ ฅ๊ฐ์ ์ ๋ ฅํ์ ๋ onValidChange๊ฐ false๋ก ํธ์ถ๋๋์ง ๊ฒ์ฆ
์ฃผ์ ๊ฒ์ ๋ชจ๋ฌ์ ์ด๊ณ ์ฃผ์๋ฅผ ์ ํํ์ ๋ postalCode์ streetAddress ํ๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋๋์ง ํ์ธ
์ด๋ฏธ์ง ์ฒจ๋ถ
๐ง ์์ผ๋ก์ ๊ณผ์