From a9c0e2a479c89aa2640a3a30b6854f9800a6fc80 Mon Sep 17 00:00:00 2001 From: deepjyoti30Alt Date: Mon, 2 Sep 2024 17:14:40 +0530 Subject: [PATCH] Fix failing test related to signin (#922) --- test/emailpassword/signinFeature.test.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/emailpassword/signinFeature.test.js b/test/emailpassword/signinFeature.test.js index 7fddc9d1a..21e6e0d5c 100644 --- a/test/emailpassword/signinFeature.test.js +++ b/test/emailpassword/signinFeature.test.js @@ -1038,7 +1038,6 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js] }, ], }) - .expect(400) .end((err, res) => { if (err) { resolve(undefined); @@ -1047,7 +1046,10 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js] resolve(JSON.parse(res.text)); }) ); - assert(response.message === "Are you sending too many / too few formFields?"); + assert(response.status === "FIELD_ERROR"); + assert(response.formFields.length === 1); + assert(response.formFields[0].error === "Field is not optional"); + assert(response.formFields[0].id === "email"); }); // Input formFields has no password field @@ -1087,7 +1089,6 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js] }, ], }) - .expect(400) .end((err, res) => { if (err) { resolve(undefined); @@ -1096,7 +1097,10 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js] resolve(JSON.parse(res.text)); }) ); - assert(response.message === "Are you sending too many / too few formFields?"); + assert(response.status === "FIELD_ERROR"); + assert(response.formFields.length === 1); + assert(response.formFields[0].error === "Field is not optional"); + assert(response.formFields[0].id === "password"); }); // Provide invalid (wrong syntax) email and wrong password, and you should get form field error