mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
test(ui): expect Settings under the Operate hub, not the sidebar
Settings moved out of the sidebar into the Operate hub. The navigation spec still expected a sidebar link. Assert that the sidebar has no Settings entry, and that the Operate hub opens Settings as a tab. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 file changed
+11
-2
@@ -20,12 +20,21 @@ test.describe('Navigation', () => {
|
||||
await expect(models.locator('.nav-label')).toHaveText('Models')
|
||||
})
|
||||
|
||||
test('the sidebar has Chat, Models, Add-ons and Settings, and no Create tier', async ({ page }) => {
|
||||
test('the sidebar has Chat, Models and Add-ons, no Settings and no Create tier', async ({ page }) => {
|
||||
await page.goto('/app')
|
||||
await expect(page.locator('.sidebar-section-title', { hasText: 'Create' })).toHaveCount(0)
|
||||
for (const href of ['/app/chat', '/app/models', '/app/addons', '/app/settings']) {
|
||||
for (const href of ['/app/chat', '/app/models', '/app/addons']) {
|
||||
await expect(page.locator(`.sidebar-nav a.nav-item[href="${href}"]`)).toBeVisible()
|
||||
}
|
||||
// Settings lives under the Operate hub, not in the sidebar.
|
||||
await expect(page.locator('.sidebar-nav a.nav-item[href="/app/settings"]')).toHaveCount(0)
|
||||
await page.locator('.sidebar-nav a.nav-item', { hasText: 'Operate' }).click()
|
||||
await expect(page).toHaveURL(/\/app\/operate$/)
|
||||
const settingsTab = page.locator('.dk-hubtabs [data-hub-tab="settings"]')
|
||||
await expect(settingsTab).toBeVisible()
|
||||
await settingsTab.click()
|
||||
await expect(page).toHaveURL(/\/app\/settings/)
|
||||
await expect(page.locator('.dk-hubtabs [data-hub-tab="settings"]')).toHaveAttribute('aria-current', 'page')
|
||||
// Studio and Talk are add-ons: the sidebar lists them only as pins, and only while they are installed.
|
||||
for (const href of ['/app/studio', '/app/talk']) {
|
||||
await expect(page.locator(`.sidebar-nav a.nav-item[href="${href}"]`)).toHaveCount(0)
|
||||
|
||||
Reference in new issue
Block a user