From ed054927094dd6ab8df13218bd9a27f387528315 Mon Sep 17 00:00:00 2001 From: minbo Date: Sat, 24 Aug 2024 13:55:26 +0900 Subject: [PATCH] =?UTF-8?q?test:=20goSecondPersonalInformation=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=88=98=EC=A0=95=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=ED=9D=AC=EB=A7=9D=20=EB=B6=84=EC=95=BC=202?= =?UTF-8?q?=EC=88=9C=EC=9C=84=EB=A5=BC=20=EC=84=A0=ED=83=9D=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=84=A0=ED=83=9D=EC=9E=90=20=EB=B2=88=EA=B2=BD=20?= =?UTF-8?q?assertion=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/cypress/support/commands.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 7e1cd65e..a385fea8 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -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() @@ -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();