Skip to content

Commit 988430c

Browse files
committed
test(react-ui): drive Manage page Backend logs link via the new kebab menu
Manage page row actions moved into ActionMenu in b336d9c, so the inline `<a title="Backend logs">` the e2e specs were asserting on no longer exists. Open the row's kebab and assert against the menuitem. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-7
1 parent b336d9c commit 988430c

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
import { test, expect } from '@playwright/test'
22

33
test.describe('Manage Page - Backend Logs Link', () => {
4-
test('models table shows terminal icon for logs', async ({ page }) => {
4+
test('row action menu exposes Backend logs entry with terminal icon', async ({ page }) => {
55
await page.goto('/app/manage')
6-
// Wait for models to load
76
await expect(page.locator('.table')).toBeVisible({ timeout: 10_000 })
87

9-
// Check for terminal icon (backend logs link)
10-
const terminalIcon = page.locator('a[title="Backend logs"] i.fa-terminal')
11-
await expect(terminalIcon.first()).toBeVisible()
8+
// Row actions live behind the kebab (ActionMenu) — open the first row's menu.
9+
const trigger = page.locator('button.action-menu__trigger').first()
10+
await expect(trigger).toBeVisible()
11+
await trigger.click()
12+
13+
const logsItem = page.getByRole('menuitem', { name: 'Backend logs' })
14+
await expect(logsItem).toBeVisible()
15+
await expect(logsItem.locator('i.fa-terminal')).toBeVisible()
1216
})
1317

14-
test('terminal icon links to backend-logs page', async ({ page }) => {
18+
test('Backend logs menu item navigates to backend-logs page', async ({ page }) => {
1519
await page.goto('/app/manage')
1620
await expect(page.locator('.table')).toBeVisible({ timeout: 10_000 })
1721

18-
const logsLink = page.locator('a[title="Backend logs"]').first()
19-
await expect(logsLink).toBeVisible()
22+
const trigger = page.locator('button.action-menu__trigger').first()
23+
await expect(trigger).toBeVisible()
24+
await trigger.click()
2025

21-
// Link uses href="#" with onClick for navigation
22-
const href = await logsLink.getAttribute('href')
23-
expect(href).toBe('#')
26+
const logsItem = page.getByRole('menuitem', { name: 'Backend logs' })
27+
await expect(logsItem).toBeVisible()
28+
await logsItem.click()
2429

25-
// Click and verify navigation
26-
await logsLink.click()
2730
await expect(page).toHaveURL(/\/app\/backend-logs\//)
2831
})
2932
})

0 commit comments

Comments
 (0)