fix(web): доска на узком окне — нижний край в окне; правки тестов Task 8 (#112, T8.1–T8.6)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev 2026-10-25 21:12:09 +04:00
parent f21dea39b6
commit 7a676d1fb1
3 changed files with 9 additions and 8 deletions

View File

@ -74,7 +74,7 @@ test("меню по проекту: у AWPCA «Бэклог» и «Спринт
test("900 px: колонки «Спринта» прокручиваются внутри доски, страница без горизонтальной прокрутки", async ({ page }) => {
await page.setViewportSize({ width: 900, height: 900 });
await login(page, "/app/jira/sprint?project=AWPCA");
await expect(page.locator(".agile-col").first()).toBeVisible();
await expect(colOf(page, "К выполнению")).toBeVisible();
const m = await page.evaluate(() => {
const d = document.documentElement, c = document.querySelector<HTMLElement>(".agile-columns")!;
return { doc: [d.scrollWidth, d.clientWidth], cols: [c.scrollWidth, c.clientWidth], bottom: c.getBoundingClientRect().bottom,
@ -91,6 +91,8 @@ test("«Широкая доска» 2560×1300: колонки одной выс
await login(page, "/app/jira/sprint?project=WIDE_E2E");
await expect(colOf(page, "Колонка 1")).toBeVisible();
await expect(colOf(page, "Без колонки")).toHaveCount(1);
const heights = () => page.evaluate(() => [...document.querySelectorAll<HTMLElement>(".agile-col")].map((c) => c.getBoundingClientRect().height));
await expect.poll(async () => { const h = await heights(); return Math.max(...h) - Math.min(...h); }, { message: "высоты колонок равны" }).toBeLessThanOrEqual(1);
const m = await page.evaluate(() => {
const board = document.querySelector<HTMLElement>(".agile-columns")!;
const heights = [...document.querySelectorAll<HTMLElement>(".agile-col")].map((c) => c.getBoundingClientRect().height);
@ -98,7 +100,6 @@ test("«Широкая доска» 2560×1300: колонки одной выс
sw: board.scrollWidth, cw: board.clientWidth, count: heights.length };
});
expect(m.count, "11 колонок и «Без колонки»").toBe(12);
expect(Math.max(...m.heights) - Math.min(...m.heights), "высоты колонок равны").toBeLessThanOrEqual(1);
expect(m.bottom, "нижний край доски в окне").toBeLessThanOrEqual(m.inner);
expect(m.sw, "доска прокручивается по горизонтали").toBeGreaterThan(m.cw);
expect(m.width, "доска шире 1440 px (нет max-width)").toBeGreaterThan(1440);
@ -133,13 +134,13 @@ test("«Бэклог» AWPCA: панель «Эпики», выбор эпика
await expect(itemOf(page, "AURORA-9008")).toHaveCount(0);
await panel.getByRole("button", { name: "Все задачи" }).click();
await expect(itemOf(page, "AURORA-9004")).toBeVisible();
const toggle = page.getByRole("button", { name: "AWPCA_Спринт 3" });
const toggle = page.getByRole("button", { name: "AWPCA_Спринт 3", exact: true });
await expect(toggle).toHaveAttribute("aria-expanded", "true");
await toggle.click();
await expect(toggle).toHaveAttribute("aria-expanded", "false");
await expect(itemOf(page, "AURORA-9004")).toHaveCount(0);
await page.reload();
await expect(page.getByRole("button", { name: "AWPCA_Спринт 3" })).toHaveAttribute("aria-expanded", "false");
await expect(page.getByRole("button", { name: "AWPCA_Спринт 3", exact: true })).toHaveAttribute("aria-expanded", "false");
await expect(itemOf(page, "AURORA-9004")).toHaveCount(0);
});
@ -159,7 +160,7 @@ test("«Спринт» AWPCA: выбор двух спринтов пишет sp
await expect(colOf(page, "Готово")).toHaveCount(0);
});
test("390×800: страница доски без горизонтальной прокрутки документа, полоса прокрутки доски в окне", async ({ page }) => {
test("390×800: документ без горизонтальной прокрутки, нижний край доски в окне (T8.1)", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 800 });
await login(page, "/app/jira/sprint?project=WIDE_E2E");
await expect(colOf(page, "Колонка 1")).toBeVisible();
@ -168,7 +169,6 @@ test("390×800: страница доски без горизонтальной
return { doc: [d.scrollWidth, d.clientWidth], bottom: b.getBoundingClientRect().bottom, inner: window.innerHeight, sw: b.scrollWidth, cw: b.clientWidth };
});
expect(m.doc[0], JSON.stringify(m)).toBeLessThanOrEqual(m.doc[1]);
// нижний край доски на 390×800 (находка T8.1, замер): аннотация, а не утверждение — см. отчёт Task 8
test.info().annotations.push({ type: "замер 390×800", description: JSON.stringify(m) });
expect(m.bottom, JSON.stringify(m)).toBeLessThanOrEqual(m.inner);
expect(m.sw).toBeGreaterThan(m.cw);
});

View File

@ -52,6 +52,7 @@ describe("AgileGate (T9.4)", () => {
open("/app/jira/sprint?project=AWPCA");
const retry = await screen.findByRole("button", { name: "Повторить" });
expect(screen.queryByText("Загрузка…")).not.toBeInTheDocument();
expect(await screen.findByText("хаб ответил 500")).toBeInTheDocument();
await userEvent.click(retry);
await waitFor(() => expect(calls).toBe(2));
await waitFor(() => expect(screen.queryByRole("button", { name: "Повторить" })).not.toBeInTheDocument());

View File

@ -46,7 +46,7 @@
.agile-columns{display:flex;align-items:stretch;gap:var(--space-3);overflow-x:auto;padding-bottom:var(--space-2);min-width:0;min-height:360px}
.agile-col{flex:0 0 280px;min-width:0;min-height:0;display:flex;flex-direction:column;gap:var(--space-2);
background:var(--color-bg-subtle);border:1px solid var(--color-border-default);border-radius:var(--radius-xl);padding:var(--space-3)}
@media (max-width:639px){.agile--wide{height:calc(100dvh - 56px - 32px)}} /* 56px — закреплённая строка «Меню» */
@media (max-width:639px){.agile--wide{height:calc(100dvh - 56px - 32px)}.agile--wide>.agile-columns{min-height:240px}} /* 56px — закреплённая строка «Меню» */
.agile-col.is-extra{border-style:dashed}
.agile-col__head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}
.agile-col__name{margin:0;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700;overflow-wrap:anywhere}