-
Notifications
You must be signed in to change notification settings - Fork 2
cypress basic 과제 제출 #2
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.
과제 진행하시느라 고생 많으셨습니다! 👍
it('doesn\'t increase over 12', () => { | ||
cy.get('.plus-button').click() | ||
.get('.count-display').should('have.value', 12); | ||
cy.get('.plus-button').click().click().click() |
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.
이렇게 클릭만 여러 번 해서 테스팅하는 방법은 생각을 못 해봤는데 좋은 방법인 것 같아요! 배워갑니다 😄
"scripts": { | ||
"build": "yarn tsc --watch", | ||
"test": "yarn cypress open" | ||
} |
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.
이 부분도 배워갑니다! 저도 적용해 봐야겠어요.
let countValue = 10; | ||
let countDisplay: HTMLInputElement | null; |
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.
countValue
와 countDisplay.value
를 따로 다루신 이유가 있을까요?
CountDisplay 요소가 input 속성이라 요소의 value를 임의로 바꿀 수 있는데, 이 경우에는 변경된 값이 반영되지 않습니다. 이런 케이스에 대해서는 어떻게 생각하시는지 궁금합니다!
No description provided.