feat(frontend): edit projects and show semantic match evidence
This commit is contained in:
1 parent
5a731c25b7
commit
bc00d6901f
52 files changed
+2992
-111
No files matched your search
@@ -403,7 +403,7 @@ test.describe("candidate without a confirmed grade with the real backend", () =>
|
||||
await page.getByLabel("Специализация").nth(1).selectOption("network_engineer");
|
||||
await page.getByLabel("Моя оценка уровня").nth(0).selectOption("middle");
|
||||
await page.getByLabel("Моя оценка уровня").nth(1).selectOption("junior");
|
||||
for (const heading of ["Опыт", "Навыки", "Условия", "Проверка"]) {
|
||||
for (const heading of ["Опыт", "Проекты", "Навыки", "Условия", "Проверка"]) {
|
||||
await page.getByRole("button", { name: "Далее", exact: true }).click();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: new RegExp(`\\. ${heading}$`) }),
|
||||
@@ -598,7 +598,17 @@ function previewFor(state: FakeState): Record<string, unknown> {
|
||||
experience_band: null,
|
||||
work_formats: null,
|
||||
salary_compatibility: null,
|
||||
projects: null,
|
||||
projects: fields.includes("projects")
|
||||
? [
|
||||
{
|
||||
title: "Платежный шлюз",
|
||||
description: "Проводки и сверки платежей.",
|
||||
stack: ["Go", "PostgreSQL"],
|
||||
repository_verified: true,
|
||||
},
|
||||
{ title: "Каталог", description: null, stack: [], repository_verified: false },
|
||||
]
|
||||
: null,
|
||||
},
|
||||
evidence: fields.includes("categories")
|
||||
? {
|
||||
@@ -795,6 +805,43 @@ test.describe("candidate visibility states with a stubbed API", () => {
|
||||
await expectNoHorizontalOverflow(page);
|
||||
});
|
||||
|
||||
test("warns before the projects are published and shows them in the preview without an address", async ({
|
||||
page,
|
||||
}) => {
|
||||
const state = freshState({
|
||||
publication: {
|
||||
state: "published",
|
||||
closed_reason: null,
|
||||
fields: ["categories", "projects"],
|
||||
consent_id: c2RecordId,
|
||||
published_at: "2026-10-08T10:00:00Z",
|
||||
version: 1,
|
||||
},
|
||||
});
|
||||
await installFakeApi(page, state);
|
||||
await page.goto("/candidate/privacy");
|
||||
|
||||
const publication = page.getByRole("region", { name: "Публикация карточки", exact: true });
|
||||
const projects = publication.getByRole("checkbox", {
|
||||
name: "Проекты: название, описание и технологии",
|
||||
});
|
||||
await expect(projects).toBeChecked();
|
||||
await expect(publication.getByText(/по ним вас могут узнать/)).toBeVisible();
|
||||
await expect(
|
||||
publication.getByText(/Адрес репозитория и его владелец компаниям не показываются никогда/),
|
||||
).toBeVisible();
|
||||
|
||||
const preview = previewSection(page);
|
||||
await expect(preview.getByRole("heading", { name: "Проекты" })).toBeVisible();
|
||||
await expect(preview.getByText("Платежный шлюз")).toBeVisible();
|
||||
await expect(preview.getByText("PostgreSQL", { exact: true })).toBeVisible();
|
||||
await expect(preview.getByText("Подтвержден публичным репозиторием")).toHaveCount(1);
|
||||
await expect(preview.locator('a[href*="github"]')).toHaveCount(0);
|
||||
await expect(preview.getByText(/github\.com/)).toHaveCount(0);
|
||||
await captureReview(page, "privacy-projects");
|
||||
await expectNoHorizontalOverflow(page);
|
||||
});
|
||||
|
||||
test("a changed search status never publishes the card", async ({ page }) => {
|
||||
const state = freshState();
|
||||
await installFakeApi(page, state);
|
||||
|
||||
Reference in new issue
Block a user