Fix expert identity case search

This commit is contained in:
SepehrYahyaee
2026-09-27 14:40:29 +03:30
parent aaf0df1cc0
commit c7c7709f0f
4 changed files with 46 additions and 16 deletions

View File

@@ -35,9 +35,15 @@ describe("applyListQueryV2", () => {
parties: [
{
person: {
phoneNumber: "0912-123-4567",
phoneNumber: "+98 912 123 4567",
nationalCodeOfDriver: "۰۰۱۲۳۴۵۶۷۸",
},
participants: [
{
phoneNumber: "0913-765-4321",
nationalCode: "۰۰۹۸۷۶۵۴۳۲۱",
},
],
},
],
},
@@ -55,7 +61,7 @@ describe("applyListQueryV2", () => {
};
const byPhone = applyListQueryV2(identityRows, identityGetters, {
phoneNumber: "09121234567",
phoneNumber: "۰۹۱۲۱۲۳۴۵۶۷",
});
expect(byPhone.list.map((row) => row.publicId)).toEqual(["PHONE"]);
@@ -63,6 +69,16 @@ describe("applyListQueryV2", () => {
nationalCode: "0012345678",
});
expect(byNationalCode.list.map((row) => row.publicId)).toEqual(["PHONE"]);
const byParticipantPhone = applyListQueryV2(identityRows, identityGetters, {
phoneNumber: "09137654321",
});
expect(byParticipantPhone.list.map((row) => row.publicId)).toEqual(["PHONE"]);
const byParticipantNationalCode = applyListQueryV2(identityRows, identityGetters, {
nationalCode: "۰۰۹۸۷۶۵۴۳۲۱",
});
expect(byParticipantNationalCode.list.map((row) => row.publicId)).toEqual(["PHONE"]);
});
it("sorts by publicId ascending", () => {