test(ui): count the first-run steps, not every list item

The recommended models are a list inside the second step, so counting
all list items read 3 only while the models were still loading. Count
the step elements, which does not depend on the load order.

Assisted-by: Claude Code:claude-sonnet-5-5 playwright
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto committed 2026-10-20 21:40:01 +00:00
1 parent 4e3040d89f
commit 9ff00c7eca
1 file changed
+1
@@ -507,6 +507,7 @@ test.describe('Home first run', () => {
await mockFirstRun(page)
await ready(page)
const guide = page.getByTestId('home-first-run')
// The steps only: the recommended models are a list inside the second step.
await expect(guide.locator('.home-step')).toHaveCount(3)
await expect(guide.locator('.home-step[data-state="now"]')).toContainText('Browse the Model Gallery')
await expect(guide.locator('.home-step').nth(1).locator('.home-starters')).toContainText('tiny-chat')