mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
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 <mudler@localai.io>
This commit is contained in:
1 file changed
+1
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user