feat(frontend): edit projects and show semantic match evidence

This commit is contained in:
shira committed 2026-10-11 14:03:31 +03:00
1 parent 5a731c25b7
commit bc00d6901f
52 files changed
+2992 -111

No files matched your search

+31 -2
View File
@@ -130,7 +130,7 @@ test.describe("candidate profile", () => {
await expect(page.getByRole("heading", { name: /\. Проверка$/ })).toBeFocused();
return;
}
for (const heading of ["Роли", "Опыт", "Навыки", "Условия", "Проверка"]) {
for (const heading of ["Роли", "Опыт", "Проекты", "Навыки", "Условия", "Проверка"]) {
if (await save.isVisible()) break;
await nextStep(page, heading);
}
@@ -201,6 +201,7 @@ test.describe("candidate profile", () => {
}) => {
const suffix = crypto.randomUUID().slice(0, 8);
const name = `Тестовый профиль ${suffix}`;
const projectTitle = `Платежный шлюз ${suffix}`;
const contactEmail = `contact-${suffix}@example.test`;
const { email } = await registerCandidate(page);
@@ -211,7 +212,7 @@ test.describe("candidate profile", () => {
await page.getByLabel("Телефон").fill("+79990000000");
await page.getByLabel("Telegram").fill("@candidate_123");
await expect(page.getByText("Шаг 1 из 6", { exact: true })).toBeVisible();
await expect(page.getByText("Шаг 1 из 7", { exact: true })).toBeVisible();
await nextStep(page, "Роли");
await page.getByRole("button", { name: "Добавить специализацию" }).click();
await page.getByLabel("Специализация").selectOption("backend");
@@ -236,6 +237,23 @@ test.describe("candidate profile", () => {
).toBeFocused();
await page.getByRole("checkbox", { name: /Подтверждаю, что места работы 1 и 2/ }).check();
await nextStep(page, "Проекты");
await page.getByRole("button", { name: "Добавить проект" }).click();
await page.getByLabel("Название", { exact: true }).fill(projectTitle);
await page.getByLabel("Что делает проект и что делали вы").fill("Проводки и сверки платежей.");
const projectTags = page.getByLabel("Технологии проекта");
await projectTags.fill("Go");
await projectTags.press("Enter");
await projectTags.fill("PostgreSQL, Kafka");
await projectTags.press("Enter");
await expect(page.getByRole("button", { name: /Убрать технологию Kafka/ })).toBeVisible();
// A wrong repository address stops the step and names the field.
await page.getByLabel("Репозиторий на GitHub, необязательно").fill("https://gitlab.com/a/b");
await page.getByRole("button", { name: "Далее", exact: true }).click();
await expect(page.getByRole("alert").filter({ hasText: "Проекты, проект 1" })).toBeFocused();
await expect(page.getByText(/Нужен адрес вида https:\/\/github\.com/).first()).toBeVisible();
await page.getByLabel("Репозиторий на GitHub, необязательно").fill("");
await nextStep(page, "Навыки");
await page.getByRole("button", { name: "Добавить навык" }).click();
await page.getByLabel("Навык 1", { exact: true }).fill("Go");
@@ -307,6 +325,17 @@ test.describe("candidate profile", () => {
await expect(page.getByText("Сохраненный шаг аккаунта: Согласия.")).toBeVisible();
await expectResponsiveKeyboardFlow(page);
// The saved project comes back with its tags.
await openReview(page);
await editStep(page, "проекты", "Проекты");
await expect(page.getByLabel("Название", { exact: true })).toHaveValue(projectTitle);
await expect(page.getByLabel("Что делает проект и что делали вы")).toHaveValue(
"Проводки и сверки платежей.",
);
await expect(page.getByRole("button", { name: /Убрать технологию PostgreSQL/ })).toBeVisible();
await page.reload();
await expect(page.getByLabel("Имя и фамилия")).toHaveValue(name);
const secondContext = await browser.newContext({
baseURL: e2eBaseUrl(),
locale: "ru-RU",