feat: add assessment, privacy and support flows

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 08:08:25 +03:00
1 parent ee3738ee73
commit e4f24fa202
339 files changed
+56454 -1126

No files matched your search

+8
View File
@@ -294,6 +294,12 @@ test.describe("company cabinet", () => {
new URL(response.url()).pathname === `/api/v1/organizations/${created.id}` &&
response.status() === 412,
);
const csrfFailureResponsePromise = page.waitForResponse(
(response) =>
response.request().method() === "PATCH" &&
new URL(response.url()).pathname === `/api/v1/organizations/${created.id}` &&
response.status() === 403,
);
const refreshedSessionPromise = page.waitForResponse(
(response) =>
response.request().method() === "GET" &&
@@ -301,6 +307,8 @@ test.describe("company cabinet", () => {
response.status() === 200,
);
await page.getByRole("button", { name: "Сохранить изменения" }).click();
const csrfFailureResponse = await csrfFailureResponsePromise;
expect(await csrfFailureResponse.json()).toMatchObject({ code: "csrf_check_failed" });
await expect(page.getByRole("alert")).toContainText("Проверка входа обновлена");
await refreshedSessionPromise;
await expect(page.getByLabel("Название компании")).toHaveValue(updatedName);