From ab596947a70e65fe6c7b9f4ec74a515bc4c9610f Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Tue, 15 Sep 2026 03:08:50 +0000 Subject: [PATCH] test(nodes): match the frontend setup command The disabled-state card renders one frontend command. Check its count and required flags without waiting for a second command that does not exist. Worker commands remain covered by the enabled-state test. Assisted-by: Codex:gpt-6 --- core/http/react-ui/e2e/nodes-roster.spec.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/http/react-ui/e2e/nodes-roster.spec.js b/core/http/react-ui/e2e/nodes-roster.spec.js index e9204ea24..e815400a6 100644 --- a/core/http/react-ui/e2e/nodes-roster.spec.js +++ b/core/http/react-ui/e2e/nodes-roster.spec.js @@ -88,12 +88,12 @@ test.describe('Nodes join command', () => { // command carrying them fails at kong before LocalAI does anything. await expect(card).not.toContainText('--distributed-nats') await expect(card).not.toContainText('--distributed-db') - // Neither step tells an operator to point anything at a bus. The FRONTEND - // command is asserted first and by itself: it is the one that used to carry - // --nats-url as a required flag, so an operator following this card would - // have stood a broker up before starting LocalAI at all. - await expect(card.locator('.p2p-cmd pre').nth(0)).toContainText('--auth-database-url') - await expect(card.locator('.p2p-cmd pre').nth(0)).not.toContainText('--nats-url') - await expect(card.locator('.p2p-cmd pre').nth(1)).not.toContainText('--nats-url') + // The disabled-state card starts the frontend. Worker commands appear + // after distributed mode is enabled and are covered by the test above. + const frontendCommand = card.locator('.p2p-cmd pre') + await expect(frontendCommand).toHaveCount(1) + await expect(frontendCommand).toContainText('local-ai run --distributed') + await expect(frontendCommand).toContainText('--auth-database-url') + await expect(frontendCommand).not.toContainText('--nats-url') }) })