Skip to content

Commit

Permalink
test: goSecondPersonalInformation 함수 수정
Browse files Browse the repository at this point in the history
프로젝트 희망 분야 2순위를 선택하는 선택자 번경
assertion 로직 추가
  • Loading branch information
smb0123 committed Aug 24, 2024
1 parent dfd018c commit ed05492
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions frontend/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ Cypress.Commands.add("goSecondPersonalInformation", () => {
.should("exist")
.click();
cy.get("span")
.contains("1순위")
.next()
.next()
.filter((index, element) => Cypress.$(element).text().trim() === "2순위")
.next()
.contains("label", "WEB")
.should("exist")
.click();
cy.get("button").contains("다음").should("exist").click();
cy.get("span").contains("이름").parent().next().type("심민보");
cy.get("span")
.contains("이름")
.parent()
.next()
.type("심민보")
.invoke("val")
.should("satisfy", (value) => value.length <= 5);
cy.get("span")
.contains("연락처")
.parent()
Expand All @@ -38,7 +42,13 @@ Cypress.Commands.add("goSecondPersonalInformation", () => {
.type("123456")
.invoke("val")
.should("match", /^\d{6}$/);
cy.get("span").contains("학적상태").parent().next().type("재학");
cy.get("span")
.contains("학적상태")
.parent()
.next()
.type("재학")
.invoke("val")
.should("satisfy", (value) => value.length >= 1);
cy.get("label").contains("4학년").should("exist").click();
cy.get("label").contains("2학기").should("exist").click();
cy.get("button").contains("다음").should("exist").click();
Expand Down

0 comments on commit ed05492

Please sign in to comment.