Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update duckduckgo-search to 6.3.4 and improve tests #4504

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ dependencies = [
"jq>=1.8.0",
"pydantic-settings==2.4.0",
"ragstack-ai-knowledge-store>=0.2.1",
"duckduckgo-search>=6.3.0",
"duckduckgo-search>=6.3.4",
"opensearch-py>=2.7.1",
"langchain-google-genai>=1.0.8",
"langchain-cohere>=0.1.5",
Expand Down
17 changes: 7 additions & 10 deletions src/frontend/tests/extended/integrations/duckduckgo.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";

test.skip("user should be able to use duckduckgo search component", async ({
test("user should be able to use duckduckgo search component", async ({
page,
}) => {
await page.goto("/");
Expand Down Expand Up @@ -60,22 +60,19 @@ test.skip("user should be able to use duckduckgo search component", async ({
"built successfully",
) ?? false;

const isRateLimit =
(await page.evaluate((el) => el.textContent, result))?.includes(
"ratelimit",
) ?? false;
await page.waitForTimeout(500);
await page.getByTestId("output-inspection-data").first().click();
await page.waitForTimeout(1000);

if (isBuiltSuccessfully) {
await page.waitForTimeout(1000);
await page.getByTestId("output-inspection-data").first().click();
await page.getByRole("gridcell").first().click();
const searchResults = await page.getByPlaceholder("Empty").inputValue();
expect(searchResults.length).toBeGreaterThan(10);
expect(searchResults.toLowerCase()).toContain("langflow");
} else if (isRateLimit) {
expect(true).toBeTruthy();
} else {
expect(true).toBeFalsy();
const value = await page.getByPlaceholder("Empty").inputValue();
expect(value.length).toBeGreaterThan(10);
expect(value.toLowerCase()).toContain("ratelimit");
}
}
});
26 changes: 13 additions & 13 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading