feat(profile): persist candidate edits and enforce company access

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 14:15:16 +03:00
1 parent 3ab6bd91a3
commit 73c7caa225
67 files changed
+5286 -229

No files matched your search

@@ -106,10 +106,18 @@ func TestCandidateProfileSeparatesSelfAssessedGradeFromConfirmedCategory(t *test
t.Error("the profile does not state confirmed categories apart from the claims")
}
update := resolveSchema(t, spec, &ogen.Schema{Ref: "#/components/schemas/CandidateProfileUpdate"})
wantUpdate := []string{"contacts", "expected_version", "experience", "full_name", "roles", "soft_skills", "stack", "terms"}
wantUpdate := []string{"confirmed_parallel_periods", "contacts", "expected_version", "experience", "full_name", "roles", "soft_skills", "stack", "terms"}
if got := propertyNames(update); !slices.Equal(got, wantUpdate) {
t.Errorf("CandidateProfileUpdate properties = %v, want %v", got, wantUpdate)
}
profile = resolveSchema(t, spec, &ogen.Schema{Ref: "#/components/schemas/CandidateProfile"})
if !slices.Contains(profile.Required, "experience_overlaps") {
t.Error("CandidateProfile does not report every overlapping experience pair")
}
confirmation := resolveSchema(t, spec, &ogen.Schema{Ref: "#/components/schemas/ProfileParallelPeriodConfirmation"})
if got := propertyNames(confirmation); !slices.Equal(got, []string{"first_index", "first_period", "second_index", "second_period"}) {
t.Errorf("ProfileParallelPeriodConfirmation properties = %v, want indices and exact periods only", got)
}
role := resolveSchema(t, spec, &ogen.Schema{Ref: "#/components/schemas/ProfileRoleItemInput"})
if got := propertyNames(role); !slices.Equal(got, []string{"self_assessed_grade", "specialization", "status"}) {