diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index ea399b9c..7e1cd65e 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -5,20 +5,41 @@ declare namespace Cypress { } Cypress.Commands.add("goSecondPersonalInformation", () => { + cy.clearAllLocalStorage(); cy.visit("http://localhost:3000/application"); - cy.get('[for=":R7dmlllkq:"]').click(); - cy.get('[for=":Rblmlllkq:"]').click(); - cy.get('[for=":r1:"]').click(); - cy.get( - ".flex-1.rounded-md.flex.justify-center.items-center.p-4.bg-dark.text-white" - ).click(); // 첫번째 인적사항 페이지로 이동 - cy.get("input.my-2.border.rounded-lg.p-4.w-full").eq(0).type("심민보"); - cy.get("input.my-2.border.rounded-lg.p-4.w-full").eq(1).type("01000000000"); - cy.get("input.my-2.border.rounded-lg.p-4.w-full").eq(2).type("111111"); - cy.get("input.my-2.border.rounded-lg.p-4.w-full").eq(3).type("재학"); - cy.get('[for=":rb:"]').click(); - cy.get('[for=":re:"]').click(); - cy.get( - ".flex-1.rounded-md.flex.justify-center.items-center.p-4.bg-dark.text-white" - ).click(); // 두번째 인적사항 페이지로 이동 + cy.get("label").contains("개발자").should("exist").click(); + cy.get("span") + .contains("1순위") + .next() + .contains("label", "APP") + .should("exist") + .click(); + cy.get("span") + .contains("1순위") + .next() + .next() + .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("00000000000") + .invoke("val") + .should("match", /^\d{3}-\d{4}-\d{4}$/); + cy.get("span") + .contains("학번") + .parent() + .next() + .type("123456") + .invoke("val") + .should("match", /^\d{6}$/); + cy.get("span").contains("학적상태").parent().next().type("재학"); + cy.get("label").contains("4학년").should("exist").click(); + cy.get("label").contains("2학기").should("exist").click(); + cy.get("button").contains("다음").should("exist").click(); });