feat: add assessment, privacy and support flows
This commit is contained in:
1 parent
ee3738ee73
commit
e4f24fa202
339 files changed
+56454
-1126
No files matched your search
@@ -135,7 +135,15 @@ describe("generated PublicationUpdate", () => {
|
||||
expected_version: number;
|
||||
state: "closed" | "published";
|
||||
fields: Array<
|
||||
"categories" | "stack" | "experience" | "soft_skills" | "location" | "relocation"
|
||||
| "categories"
|
||||
| "stack"
|
||||
| "experience"
|
||||
| "soft_skills"
|
||||
| "location"
|
||||
| "relocation"
|
||||
| "self_assessment"
|
||||
| "work_formats"
|
||||
| "salary_compatibility"
|
||||
>;
|
||||
}>();
|
||||
});
|
||||
@@ -205,23 +213,31 @@ describe("generated HiddenOrganization", () => {
|
||||
|
||||
describe("generated AnonymousCardContent", () => {
|
||||
const card = {
|
||||
categories: [{ specialization: "backend", grade: "middle" }],
|
||||
stack: ["PostgreSQL", "Kafka"],
|
||||
experience_months: null,
|
||||
soft_skills: null,
|
||||
location: null,
|
||||
relocation: null,
|
||||
pseudonym: `cv1_${"a".repeat(43)}`,
|
||||
categories: [{ specialization: "backend", grade: "middle", strength: "standard" }],
|
||||
stack: ["postgresql", "kafka"],
|
||||
self_assessment: [
|
||||
{
|
||||
specialization: "network_engineer",
|
||||
confirmation_status: "unconfirmed",
|
||||
declared_grade: "junior",
|
||||
},
|
||||
],
|
||||
experience_band: "1_3",
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
};
|
||||
|
||||
it("holds only the closed set of card properties and reads an unpublished one as null", () => {
|
||||
expect(AnonymousCardContent.parse(card)).toEqual(card);
|
||||
expect(Object.keys(AnonymousCardContent.shape).sort()).toEqual([
|
||||
"categories",
|
||||
"experience_months",
|
||||
"location",
|
||||
"relocation",
|
||||
"soft_skills",
|
||||
"experience_band",
|
||||
"pseudonym",
|
||||
"salary_compatibility",
|
||||
"self_assessment",
|
||||
"stack",
|
||||
"work_formats",
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -251,7 +267,7 @@ describe("generated AnonymousCardContent", () => {
|
||||
expect(
|
||||
CardPreview.parse({ ...closed, state: "published", fields: ["stack"], card }),
|
||||
).toMatchObject({
|
||||
card: { stack: ["PostgreSQL", "Kafka"] },
|
||||
card: { stack: ["postgresql", "kafka"] },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user