From e1125c8aea0cc559c8c0dffd723b819f31fbdfce Mon Sep 17 00:00:00 2001 From: mudler-agent Date: Sun, 25 Oct 2026 09:10:47 +0100 Subject: [PATCH] test(ui): turn the feature switches on in the navigation specs (#12895) The sidebar and the Build overview show the Add-ons and Fine-tuning entries only when the server reports those switches on. With no add-on owner running, the server reports the add-ons switch off, and the test server has the fine-tuning switch off, so the two specs failed on master. The two tests are about those entries being shown, so they set the switches on and keep the server's other flags. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- core/http/react-ui/e2e/navigation.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/http/react-ui/e2e/navigation.spec.js b/core/http/react-ui/e2e/navigation.spec.js index 74970923d..9ac7befba 100644 --- a/core/http/react-ui/e2e/navigation.spec.js +++ b/core/http/react-ui/e2e/navigation.spec.js @@ -1,4 +1,5 @@ import { test, expect } from './coverage-fixtures.js' +import { stubAddonRoutes } from './addons-fixtures.js' test.describe('Navigation', () => { test('/ redirects to /app', async ({ page }) => { @@ -21,6 +22,7 @@ test.describe('Navigation', () => { }) test('the sidebar has Chat, Models and Add-ons, no Settings and no Create tier', async ({ page }) => { + await stubAddonRoutes(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']) { @@ -81,6 +83,11 @@ test.describe('Navigation', () => { }) test('the Build overview lists the tools with a line each', async ({ page }) => { + // The Fine-tuning tile is shown when the server has the switch on. + await page.route('**/api/features', async route => { + const real = await (await route.fetch()).json() + return route.fulfill({ json: { ...real, fine_tuning: true } }) + }) await page.goto('/app/build') const list = page.getByRole('list', { name: 'Build tools' }) // Each tool is a row with its sentence and an Open link.