feat(evidence): project skill evidence from confirmed assessments
This commit is contained in:
1 parent
4761508f13
commit
c2a8d17195
94 files changed
+10077
-151
No files matched your search
@@ -40,6 +40,10 @@ var (
|
||||
// sharedLeafSchemas are the reusable leaves that the privacy family may
|
||||
// refer to; none of them identifies a person or carries a contact.
|
||||
sharedLeafSchemas = []string{"Timestamp", "PageInfo", "SpecializationCode", "GradeCode", "StackTag"}
|
||||
// previewEvidenceSchemas are the evidence leaves that the preview reaches
|
||||
// to show what an organization would read with the categories. They carry
|
||||
// a skill, a grade, a trust level, a year, and the demonstration labels, and no identifier.
|
||||
previewEvidenceSchemas = []string{"OrganizationEvidence", "OrganizationEvidenceFact", "EvidenceSkillCode", "EvidenceTrustLevel", "EvidenceBasis", "EvidenceCalibrationStatus"}
|
||||
)
|
||||
|
||||
func isPrivacySchema(name string) bool {
|
||||
@@ -262,11 +266,11 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
|
||||
}
|
||||
|
||||
// What the card and the preview reach is a small closed list of leaves.
|
||||
allowed := []string{
|
||||
allowed := slices.Concat([]string{
|
||||
"AnonymousCardContent", "CardCategory", "CardCategoryStrength", "CardSelfAssessment", "CardSelfAssessmentConfirmationStatus", "CandidateExperienceBand", "CandidateWorkFormat",
|
||||
"CandidateSalaryCompatibility", "CardField", "CardFieldSet", "PublicationState", "SpecializationCode",
|
||||
"GradeCode", "StackTag", "Timestamp", "CardPreview",
|
||||
}
|
||||
}, previewEvidenceSchemas)
|
||||
for _, name := range []string{"AnonymousCardContent", "CardPreview"} {
|
||||
for reached := range reachableSchemas(index, mustJSONValue(t, spec.Components.Schemas[name])) {
|
||||
if !slices.Contains(allowed, reached) {
|
||||
@@ -286,7 +290,7 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
|
||||
strings.HasPrefix(reached, "Invitation") || strings.HasPrefix(reached, "Need") || strings.HasPrefix(reached, "Consent") {
|
||||
t.Errorf("%s reaches %s", path, reached)
|
||||
}
|
||||
if !isPrivacySchema(reached) && !slices.Contains(sharedLeafSchemas, reached) && !strings.HasPrefix(reached, "Problem") &&
|
||||
if !isPrivacySchema(reached) && !slices.Contains(sharedLeafSchemas, reached) && !slices.Contains(previewEvidenceSchemas, reached) && !strings.HasPrefix(reached, "Problem") &&
|
||||
reached != "Problem" && reached != "ProblemCode" {
|
||||
t.Errorf("%s reaches %s, which is neither a privacy schema nor a shared leaf", path, reached)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user