Skip to content

Commit

Permalink
Fix failing test related to signin (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30Alt authored Sep 2, 2024
1 parent bf58034 commit a9c0e2a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/emailpassword/signinFeature.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js]
},
],
})
.expect(400)
.end((err, res) => {
if (err) {
resolve(undefined);
Expand All @@ -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
Expand Down Expand Up @@ -1087,7 +1089,6 @@ describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js]
},
],
})
.expect(400)
.end((err, res) => {
if (err) {
resolve(undefined);
Expand All @@ -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
Expand Down

0 comments on commit a9c0e2a

Please sign in to comment.