OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
fix: azure openAI button issue (#2442)
VisveshJec76cdb36626
diff --git a/frontend/components/label-wrapper.tsx b/frontend/components/label-wrapper.tsxindex 7f400c9e9..5570facf5 100644--- a/frontend/components/label-wrapper.tsx+++ b/frontend/components/label-wrapper.tsx@@ -51,7 +51,7 @@ export function LabelWrapper({{required && <span className="text-red-500">*</span>}{helperText && (<Tooltip>- <TooltipTrigger>+ <TooltipTrigger type="button"><Info className="w-3.5 h-3.5 text-muted-foreground" /></TooltipTrigger><TooltipContent side="right">{helperText}</TooltipContent>diff --git a/frontend/tests/pages/Knowledge.ts b/frontend/tests/pages/Knowledge.tsindex ded39a2ad..dab72b881 100644--- a/frontend/tests/pages/Knowledge.ts+++ b/frontend/tests/pages/Knowledge.ts@@ -676,7 +676,9 @@ export class Knowledge {}async getFirstChunkText(): Promise<string> {- await expect(this.page.getByText(/Chunk \d+/i).first()).toBeVisible();+ await expect(this.page.getByText(/Chunk \d+/i).first()).toBeVisible({+ timeout: 15000,+ });const chunk = this.page.locator("blockquote").first();return (await chunk.textContent()) || "";@@ -1067,15 +1069,33 @@ export class Knowledge {* @returns Array containing the top 2 chunk texts after search*/async searchChunks(searchToken: string): Promise<string[]> {- // Locate the search input in the chunk viewer- const searchInp = this.searchInput();+ // Locate the chunk-specific search input (not the knowledge-list search bar).+ // Both inputs match placeholder*="Search"; narrow to "chunks" to avoid ambiguity.+ const searchInp = this.page.locator('input[placeholder*="chunks"]');await expect(searchInp).toBeVisible({ timeout: 5000 });// Clear any existing search and enter the tokenawait searchInp.clear();await searchInp.fill(searchToken);await this.page.keyboard.press("Enter");- // Wait for search to complete and chunks to re-rank- await this.page.waitForTimeout(2000);+ // The panel filters via React's useDeferredValue, so the DOM update is+ // asynchronous. Poll until at least one rendered blockquote contains the+ // search token — this is the only reliable signal that the deferred filter+ // update has fully committed, rather than treating a visible-but-stale+ // first chunk or a fixed delay as evidence of completion.+ await expect+ .poll(+ async () => {+ const chunks = this.chunkElements();+ const count = await chunks.count();+ for (let i = 0; i < count; i++) {+ const text = await chunks.nth(i).textContent();+ if (text?.includes(searchToken)) return true;+ }+ return false;+ },+ { timeout: 10000 },+ )+ .toBe(true);// Get all chunks after searchconst allChunks = await this.getAllChunks();// Return only the top 2 chunksdiff --git a/frontend/tests/pages/Settings.ts b/frontend/tests/pages/Settings.tsindex 73d6c4e58..e44991860 100644--- a/frontend/tests/pages/Settings.ts+++ b/frontend/tests/pages/Settings.ts@@ -227,7 +227,10 @@ export class Settings {await saveButton.scrollIntoViewIfNeeded();await this.page.waitForTimeout(500);await expect(saveButton).toBeVisible();- await expect(saveButton).toBeEnabled({ timeout: 10000 });+ // Allow up to 30s: enabling picture-descriptions makes the save button+ // wait until the VLM model catalogue has loaded and auto-selected a model+ // (vlmModelPending gate). 10s was too short on slow CI runners.+ await expect(saveButton).toBeEnabled({ timeout: 30000 });await saveButton.click();await expect(this.settingsUpdatedToast()).toBeVisible({ timeout: 120000 });}