feat(assessment): assign the demonstration category and keep result history
This commit is contained in:
1 parent
b3c6dc870b
commit
8277133712
61 files changed
+4338
-268
No files matched your search
@@ -302,6 +302,9 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
for reached := range reachableSchemas(index, mustJSONValue(t, schema)) {
|
||||
if searchResultMayReachCardBand(name, reached) {
|
||||
continue
|
||||
}
|
||||
if isPrivacySchema(reached) && reached != "AnonymousCardContent" && reached != "CardCategory" && reached != "CardField" && reached != "CardFieldSet" {
|
||||
t.Errorf("%s reaches the candidate-private schema %s", name, reached)
|
||||
}
|
||||
@@ -320,6 +323,9 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
|
||||
}, reached) {
|
||||
continue
|
||||
}
|
||||
if path == "/api/v1/organizations/{org_id}/matches" && searchResultMayReachCardBand("Match", reached) {
|
||||
continue
|
||||
}
|
||||
if isPrivacySchema(reached) {
|
||||
t.Errorf("%s reaches the candidate-private schema %s", path, reached)
|
||||
}
|
||||
@@ -332,6 +338,18 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// searchResultMayReachCardBand reports whether a match search schema reaches
|
||||
// one of the two coarse leaves that the anonymous card itself carries: the
|
||||
// salary compatibility (a compatible or not_compatible verdict, never an
|
||||
// amount) and the experience band (a coarse bucket, never a date). The search
|
||||
// contract reuses the card content, so its filters and results legitimately
|
||||
// name these leaves. Only match schemas get this allowance; no other
|
||||
// organization-visible schema may reach a privacy schema.
|
||||
func searchResultMayReachCardBand(schema, reached string) bool {
|
||||
return strings.HasPrefix(schema, "Match") &&
|
||||
(reached == "CandidateSalaryCompatibility" || reached == "CandidateExperienceBand")
|
||||
}
|
||||
|
||||
// The generated request DTOs carry only what the candidate may choose: no
|
||||
// consent identifier, time, interval, or policy version.
|
||||
func TestGeneratedPrivacyDTOsCarryNoServerOwnedFields(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user