Skip to content

Commit

Permalink
fix(FSADT1-1444|FSADT1-1451): updated fuzzy message format (#1092)
Browse files Browse the repository at this point in the history
* fix(FSADT1-1442): fixed staff submission completion menu

* fix(FSADT1-1442): fixed spacing for external

* chore: updating stubs

* fix(FSADT1-1442): updated fuzzy match tests

* fix(FSADT1-1442): updated fuzzy display

* chore: changing configuration

* chore: removing log

* test(FSADT1-1442): updated test messages

* fix(FSADT1-1444): fixed individual matching

There was an issue that was using the business name instead of the last name as last name.

* fix(FSADT1-1444): fixed individual matching

There was an issue that was using the business name instead of the last name as last name.

* fix(FSADT1-1444): fixed some issues with fuzzy

* chore: refactoring test class

* chore: removing commented code

* chore: adding stubs

* chore: fixing merge conflicts

* chore: fixing merge conflicts

* test(FSADT1-1444): fixed some matching messages

* chore: fixed merge conflict

* chore: fixed merge conflicts
  • Loading branch information
paulushcgcj authored Aug 21, 2024
1 parent 3c3bd6c commit 02a4fa2
Show file tree
Hide file tree
Showing 17 changed files with 914 additions and 752 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Mono<Void> matchStep(ClientSubmissionDto dto) {
legacyService
.searchIndividual(
dto.businessInformation().firstName(),
dto.businessInformation().businessName(),
dto.businessInformation().lastName(),
dto.businessInformation().birthdate(),
null
)
Expand All @@ -84,7 +84,7 @@ public Mono<Void> matchStep(ClientSubmissionDto dto) {
legacyService
.searchIndividual(
dto.businessInformation().firstName(),
dto.businessInformation().businessName(),
dto.businessInformation().lastName(),
dto.businessInformation().birthdate(),
dto.businessInformation().clientIdentification()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void shouldRunMatch(
.stubFor(
get(urlPathEqualTo("/api/search/individual"))
.withQueryParam("firstName", equalTo(dto.businessInformation().firstName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().businessName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().lastName()))
.withQueryParam("dob", equalTo(dto.businessInformation().birthdate().format(
DateTimeFormatter.ISO_DATE))
)
Expand All @@ -98,7 +98,7 @@ void shouldRunMatch(
.stubFor(
get(urlPathEqualTo("/api/search/individual"))
.withQueryParam("firstName", equalTo(dto.businessInformation().firstName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().businessName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().lastName()))
.withQueryParam("dob", equalTo(dto.businessInformation().birthdate().format(
DateTimeFormatter.ISO_DATE))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public static ClientSubmissionDto getIndividualDto(
.withBusinessInformation(
dto
.businessInformation()
.withBusinessName(lastName)
.withBusinessName(firstName + " " + lastName)
.withFirstName(firstName)
.withLastName(lastName)
.withBusinessType("U")
.withBirthdate(birthdate)
.withIdentificationType(new ClientValueTextDto(idType, idType))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void shouldFailForInvalidCases(
}

@DisplayName("Matching individuals")
@ParameterizedTest
@ParameterizedTest(name = "{0}")
@MethodSource("individualMatch")
void shouldMatchIndividuals(
ClientSubmissionDto dto,
Expand All @@ -90,7 +90,7 @@ void shouldMatchIndividuals(
.stubFor(
get(urlPathEqualTo("/api/search/individual"))
.withQueryParam("firstName", equalTo(dto.businessInformation().firstName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().businessName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().lastName()))
.withQueryParam("dob", equalTo(dto.businessInformation().birthdate().format(
DateTimeFormatter.ISO_DATE))
)
Expand All @@ -101,7 +101,7 @@ void shouldMatchIndividuals(
.stubFor(
get(urlPathEqualTo("/api/search/individual"))
.withQueryParam("firstName", equalTo(dto.businessInformation().firstName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().businessName()))
.withQueryParam("lastName", equalTo(dto.businessInformation().lastName()))
.withQueryParam("dob", equalTo(dto.businessInformation().birthdate().format(
DateTimeFormatter.ISO_DATE))
)
Expand Down Expand Up @@ -520,13 +520,15 @@ private static Stream<Arguments> invalidCases() {
private static Stream<Arguments> individualMatch() {
return Stream.of(
Arguments.of(
getIndividualDto(
"Jhon",
"Wick",
LocalDate.of(1970, 1, 1),
"CDDL",
"BC",
"1234567"
named("no matches",
getIndividualDto(
"Jhon",
"Wick",
LocalDate.of(1970, 1, 1),
"CDDL",
"BC",
"1234567"
)
),
"[]",
"[]",
Expand All @@ -535,13 +537,15 @@ private static Stream<Arguments> individualMatch() {
false
),
Arguments.of(
getIndividualDto(
"James",
"Wick",
LocalDate.of(1970, 1, 1),
"CDDL",
"AB",
"7654321"
named("doc match",
getIndividualDto(
"James",
"Wick",
LocalDate.of(1970, 1, 1),
"CDDL",
"AB",
"7654321"
)
),
"[]",
"[]",
Expand All @@ -550,13 +554,15 @@ private static Stream<Arguments> individualMatch() {
false
),
Arguments.of(
getIndividualDto(
"Valeria",
"Valid",
LocalDate.of(1970, 1, 1),
"CDDL",
"YK",
"1233210"
named("full match",
getIndividualDto(
"Valeria",
"Valid",
LocalDate.of(1970, 1, 1),
"CDDL",
"YK",
"1233210"
)
),
"[]",
"[{\"clientNumber\":\"00000002\"}]",
Expand All @@ -565,13 +571,15 @@ private static Stream<Arguments> individualMatch() {
false
),
Arguments.of(
getIndividualDto(
"Papernon",
"Pompadour",
LocalDate.of(1970, 1, 1),
"CDDL",
"ON",
"9994545"
named("fuzzy match",
getIndividualDto(
"Papernon",
"Pompadour",
LocalDate.of(1970, 1, 1),
"CDDL",
"ON",
"9994545"
)
),
"[{\"clientNumber\":\"00000003\"}]",
"[]",
Expand All @@ -580,13 +588,15 @@ private static Stream<Arguments> individualMatch() {
true
),
Arguments.of(
getIndividualDto(
"Karls",
"Enrikvinjon",
LocalDate.of(1970, 1, 1),
"CDDL",
"BC",
"3337474"
named("fuzzy and full",
getIndividualDto(
"Karls",
"Enrikvinjon",
LocalDate.of(1970, 1, 1),
"CDDL",
"BC",
"3337474"
)
),
"[{\"clientNumber\":\"00000004\"}]",
"[{\"clientNumber\":\"00000005\"}]",
Expand All @@ -595,13 +605,15 @@ private static Stream<Arguments> individualMatch() {
false
),
Arguments.of(
getIndividualDto(
"Palitz",
"Yelvengard",
LocalDate.of(1970, 1, 1),
"USDL",
"AZ",
"7433374"
named("all matches",
getIndividualDto(
"Palitz",
"Yelvengard",
LocalDate.of(1970, 1, 1),
"USDL",
"AZ",
"7433374"
)
),
"[{\"clientNumber\":\"00000006\"}]",
"[{\"clientNumber\":\"00000007\"}]",
Expand Down
3 changes: 2 additions & 1 deletion frontend/.devcontainer/frontend.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint.ignoreUntitled": true,
"eslint.options": {
"configFile": "./.eslintrc.js"
}
},
"scm.showHistoryGraph": false
}
}
Loading

0 comments on commit 02a4fa2

Please sign in to comment.