From 116eb5811921d5f3d8bd9c3bd7064d7bce2994de Mon Sep 17 00:00:00 2001 From: Petr Pokorny Date: Fri, 24 Apr 2026 12:53:06 +0200 Subject: [PATCH] Fix smoke test: expand collapsed repo sections before counting cards The 'Each repo section has at least one worktree card' test failed because AITestAgent was collapsed on startup (persisted in config). Collapsed sections don't render .wt-card elements, so the count was 0. Fix: detect collapsed sections via .repo-header.collapsed class, click to expand them, then verify cards are present. --- src/Tests/SmokeTests.fs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Tests/SmokeTests.fs b/src/Tests/SmokeTests.fs index 6459118..c75737f 100644 --- a/src/Tests/SmokeTests.fs +++ b/src/Tests/SmokeTests.fs @@ -335,7 +335,16 @@ type MultiRepoSmokeTests() = for idx in 0 .. count - 1 do let section = sections.Nth(idx) + let header = section.Locator(".repo-header") let! repoName = section.Locator(".repo-name").TextContentAsync() + + // Expand collapsed sections so cards become visible + let! headerClass = header.GetAttributeAsync("class") + if headerClass <> null && headerClass.Contains("collapsed") then + TestContext.Out.WriteLine($"Repo '{repoName}' is collapsed, expanding") + do! header.ClickAsync() + do! section.Locator(".card-grid").WaitForAsync(LocatorWaitForOptions(Timeout = 5000.0f)) + let cards = section.Locator(".wt-card") let! cardCount = cards.CountAsync() TestContext.Out.WriteLine($"Repo '{repoName}': {cardCount} cards")