diff --git a/ui/src/e2e/route-css.e2e.test.ts b/ui/src/e2e/route-css.e2e.test.ts index d2cce061e3b8..6cf17f6aa5ee 100644 --- a/ui/src/e2e/route-css.e2e.test.ts +++ b/ui/src/e2e/route-css.e2e.test.ts @@ -73,18 +73,27 @@ describeControlUiE2e("Control UI route CSS mocked Gateway E2E", () => { const cronStyles = await page.evaluate(() => { const probe = document.createElement("div"); probe.innerHTML = ` -
code
+
code
session `; document.body.append(probe); const list = probe.querySelector("ul"); + const secondListItem = probe.querySelector("li + li"); const pre = probe.querySelector("pre"); const link = probe.querySelector(".session-link"); - if (!(list instanceof HTMLElement) || !(pre instanceof HTMLElement) || !link) { + if ( + !(list instanceof HTMLElement) || + !(secondListItem instanceof HTMLElement) || + !(pre instanceof HTMLElement) || + !link + ) { throw new Error("Cron style probe did not render"); } + const listItemStyle = getComputedStyle(secondListItem); const result = { listPadding: Number.parseFloat(getComputedStyle(list).paddingLeft), + listItemGap: Number.parseFloat(listItemStyle.marginTop), + listItemFontSize: Number.parseFloat(listItemStyle.fontSize), preBorderStyle: getComputedStyle(pre).borderTopStyle, preOverflow: getComputedStyle(pre).overflowX, sessionFontWeight: getComputedStyle(link).fontWeight, @@ -94,6 +103,7 @@ describeControlUiE2e("Control UI route CSS mocked Gateway E2E", () => { return result; }); expect(cronStyles.listPadding).toBeGreaterThan(0); + expect(cronStyles.listItemGap / cronStyles.listItemFontSize).toBeCloseTo(0.4, 2); expect(cronStyles.preBorderStyle).toBe("solid"); expect(cronStyles.preOverflow).toBe("auto"); expect(cronStyles.sessionFontWeight).toBe("500"); diff --git a/ui/src/styles/chat/text.css b/ui/src/styles/chat/text.css index 783c6bc034da..545fed9727b5 100644 --- a/ui/src/styles/chat/text.css +++ b/ui/src/styles/chat/text.css @@ -60,7 +60,7 @@ } .chat-text :where(li + li) { - margin-top: 0.25em; + margin-top: 0.4em; } /* Hide default marker only for unordered task lists; ordered lists keep numbers */