From 0d629c19cd5375562857df75013c08c0e15b301c Mon Sep 17 00:00:00 2001 From: notmd Date: Thu, 26 Jan 2023 02:13:30 +0700 Subject: [PATCH] fix test --- website/cypress/e2e/auth/signin.cy.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/website/cypress/e2e/auth/signin.cy.ts b/website/cypress/e2e/auth/signin.cy.ts index 2a651f1f..04a042cf 100644 --- a/website/cypress/e2e/auth/signin.cy.ts +++ b/website/cypress/e2e/auth/signin.cy.ts @@ -14,11 +14,20 @@ describe("signin flow", () => { cy.request("GET", "/api/auth/csrf") .then((response) => { const csrfToken = response.body.csrfToken; - cy.request("POST", "/api/auth/signin/email", { - callbackUrl: "/", - email: emailAddress, - csrfToken, - json: "true", + cy.request({ + form: true, + method: "POST", + url: "/api/auth/signin/email", + body: { + callbackUrl: "/", + email: emailAddress, + csrfToken, + json: "true", + captcha: "XXXX.DUMMY.TOKEN.XXXX", + }, + headers: { + "content-type": "application/x-www-form-urlencoded", + }, }); }) .then((response) => {