From 48634619c107f89bf69a74151ce0fdd9300534eb Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 21 Oct 2026 00:59:54 +0000 Subject: [PATCH] test(ui): read the server address in the add-node spec from the page The spec expected the register address to carry port 8089, so it failed on any other port. It now expects the origin the page was opened from. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto --- core/http/react-ui/e2e/add-node.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/http/react-ui/e2e/add-node.spec.js b/core/http/react-ui/e2e/add-node.spec.js index d6afe9cfc..23192574b 100644 --- a/core/http/react-ui/e2e/add-node.spec.js +++ b/core/http/react-ui/e2e/add-node.spec.js @@ -13,7 +13,7 @@ test.describe('Add a node', () => { await page.goto('/app/nodes/add') await expect(page.getByRole('heading', { name: 'Add a node' })).toBeVisible({ timeout: 15_000 }) await expect(page.getByRole('radio', { name: 'Registered worker' })).toHaveAttribute('aria-checked', 'true') - await expect(command(page)).toContainText('LOCALAI_REGISTER_TO="http://127.0.0.1:8089"') + await expect(command(page)).toContainText(`LOCALAI_REGISTER_TO="${new URL(page.url()).origin}"`) await expect(command(page)).toContainText('LOCALAI_REGISTRATION_TOKEN="$TOKEN"') await expect(command(page)).toContainText('localai/localai:latest-cpu worker') await expect(page.getByText('This page never shows it.')).toBeVisible()