-
Notifications
You must be signed in to change notification settings - Fork 69
[2단계 - 나만의 유튜브 강의실] 유세지(김용래) 미션 제출합니다. #140
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
Changes from all commits
155fee3
2b83fef
0714f78
d174a69
ee81b91
17c33a5
4d6f70e
ecf3d13
09e9a8e
f88f820
05f7d8e
60d3542
f1a1189
104123f
eb5ac95
370faa6
99a2713
5df0f9a
48105a2
82cfd77
9955e34
ee21df7
6bf3540
b9fc002
7a47dd6
452cac0
554b1ac
260ac79
4d93220
de6a743
f238a3e
98c5a19
4cde156
592d52e
45c75c2
bb3cfcb
84faf8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,9 +9,11 @@ Cypress.Commands.add("searchWithNoKeyword", () => { | |||||||||
|
|
||||||||||
| cy.on("window:alert", alertStub); | ||||||||||
| cy.get("#search-input-keyword").clear().type(" "); | ||||||||||
| cy.get("#search-button").click(() => { | ||||||||||
| expect(alertStub).to.be.calledWith(ERROR_MESSAGE.SEARCH_INPUT_IS_EMPTY); | ||||||||||
| }); | ||||||||||
| cy.get("#search-button") | ||||||||||
| .click() | ||||||||||
| .then(() => { | ||||||||||
| expect(alertStub).to.be.calledWith(ERROR_MESSAGE.SEARCH_INPUT_IS_EMPTY); | ||||||||||
| }); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| Cypress.Commands.add("searchWithKeyword", (keyword) => { | ||||||||||
|
|
@@ -30,3 +32,25 @@ Cypress.Commands.add("loadMoreVideos", () => { | |||||||||
| Cypress.Commands.add("closeSearchModal", () => { | ||||||||||
| cy.get(".dimmer").click({ force: true }); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이전 PR에 테스트중에 searchWithNoKeyword 커맨드 추가에서 고칠 부분이 있어요 cy.get("#search-button").click().then(() => {
expect(alertStub).to.be.calledWith(ERROR_MESSAGE.SEARCH_INPUT_IS_EMPTY);
});
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 앗... 다음 동작을 click() 안에 넣어버렸네요 😭😭 수정했습니다! |
||||||||||
| Cypress.Commands.add("clickWatchedVideoListTab", () => { | ||||||||||
| cy.get("#watched-video-button").click(); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| Cypress.Commands.add("clickWatchLaterVideoListTab", () => { | ||||||||||
| cy.get("#watch-later-video-button").click(); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| Cypress.Commands.add("clickVideoWatchButton", () => { | ||||||||||
| cy.get(".video-item__watched-button").eq(0).click(); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| Cypress.Commands.add("clickVideoDeleteButton", (confirmButtonClick) => { | ||||||||||
| cy.get(".video-item__delete-button").eq(0).click(); | ||||||||||
|
|
||||||||||
| cy.on("window:confirm", (text) => { | ||||||||||
| console.log(text); | ||||||||||
| expect(text).to.contains("정말로 삭제하시겠습니까?"); | ||||||||||
| return confirmButtonClick; | ||||||||||
|
Comment on lines
+52
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return은 안해주셔도 괜찮아보여요!
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return 문에 boolean 값을 넣어주는걸로 comfirm창의 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
cypress window:confirm에 return이 필요한걸 깜빡했네요 🙇 |
||||||||||
| }); | ||||||||||
| }); | ||||||||||
|
Comment on lines
+36
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Custom Command 잘 사용해주셨어요 👏 |
||||||||||
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.
보고싶은 영상 찾기 모달창 안에서 검색된 영상이 이미 저장된 영상이라면 저장 버튼이 보이지 않아야 한다테스트 케이스에서 에러가 발생해요.cy.searchWithKeyword(searchKeyword)를 제거하면 이전에 검색한 상태에서 테스트를 진행해서 에러를 없앨 수 있어요 👀Uh oh!
There was an error while loading. Please reload this page.
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.
같은 검색어로도 실제 검색 결과가 다를 수 있다는 점을 간과했네요 😭
불필요한 재검색이기도 해서 삭제하였습니다!
bb3cfcb