import { expect, test } from "@playwright/test"; import { captureScreenshot, completeOnboarding, signup, waitForChatComposer } from "./helpers"; test("a long run shows its answer with the earlier steps folded", async ({ page }, testInfo) => { const stamp = Date.now(); await signup(page, `run-steps-${stamp}@rakazo.test`, "password12", "Steps"); await completeOnboarding(page); await waitForChatComposer(page); const composer = page.getByRole("combobox", { name: /Message|Nachricht/i }); await composer.fill("Show your steps"); await composer.press("Enter"); const transcript = page.getByTestId("transcript"); await expect(transcript.getByText("Here is the summary.")).toBeVisible({ timeout: 60_000 }); const steps = transcript.getByTestId("run-steps"); await expect(steps).toHaveCount(1); await expect(transcript.getByText("Opening the page.")).toHaveCount(0); await captureScreenshot(page, testInfo, "run-steps-folded"); await steps.getByRole("button", { name: "2 steps" }).click(); await expect(steps.getByText("Opening the page.")).toBeVisible(); await expect(steps.getByText("Reading the article.")).toBeVisible(); await captureScreenshot(page, testInfo, "run-steps-open"); });