fix(assessment): return confirmed categories with their basis and label demonstration categories

This commit is contained in:
shira committed 2026-10-09 21:24:24 +03:00
1 parent 623d41b969
commit d4903a3796
77 files changed
+1441 -288

No files matched your search

@@ -128,7 +128,10 @@ func TestSearchOrganizationMatchesMapsAConfirmedEntryWithANullPercentile(t *test
handle := "cv1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
stub := &matchOperationsStub{result: matching.Result{Main: []matching.Entry{{
CandidateHandle: handle, Specialization: domain.SpecializationBackend,
Category: &domain.CandidateViewCategory{Specialization: domain.SpecializationBackend, Grade: domain.GradeMiddle, Strength: domain.CandidateViewStrengthStrong},
Category: &domain.CandidateViewCategory{
Specialization: domain.SpecializationBackend, Grade: domain.GradeMiddle, Strength: domain.CandidateViewStrengthStrong,
Basis: domain.AssessmentCategorySourceSyntheticDemo,
},
Components: matching.Components{
Fit: 0.5, Coverage: 0.5, Domain: 0.5, Semantics: 0.5, Freshness: 0.5, Responsiveness: 0.5, RankScore: 0.45125,
},
@@ -147,7 +150,8 @@ func TestSearchOrganizationMatchesMapsAConfirmedEntryWithANullPercentile(t *test
t.Fatalf("encode response: %v", err)
}
for _, want := range []string{
`"confirmation_status":"confirmed"`, `"declared_grade":null`, `"category":{"specialization":"backend","grade":"middle"}`, `"strength":"strong"`,
`"confirmation_status":"confirmed"`, `"declared_grade":null`,
`"category":{"specialization":"backend","grade":"middle","basis":"synthetic_demo"}`, `"strength":"strong"`,
`"percentile":null`, `"competition":0`, `"rank_score":0.45125`,
} {
if !strings.Contains(string(encoded), want) {