Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix market research input found
  • Loading branch information
Cristhianzl committed Jan 7, 2026
commit 68c8285d3114ba987d1babb28010cc02c3a2902b
25 changes: 21 additions & 4 deletions src/frontend/tests/core/integrations/Market Research.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,27 @@ withEventDeliveryModes(
});

await initialGPTsetup(page);
await page
.getByTestId("popover-anchor-input-api_key")
.nth(0)
.fill(process.env.TAVILY_API_KEY ?? "");

// Find the Tavily node and fill the API key with retry
const tavilyNode = page.getByTestId(/rf__node-TavilySearchComponent-/);
const tavilyApiKeyInput = tavilyNode.getByTestId("popover-anchor-input-api_key");

const maxRetries = 5;
for (let attempt = 0; attempt < maxRetries; attempt++) {
await tavilyApiKeyInput.waitFor({ state: "visible", timeout: 10000 });
await tavilyApiKeyInput.click();
await tavilyApiKeyInput.clear();
await tavilyApiKeyInput.fill(process.env.TAVILY_API_KEY ?? "");
await tavilyApiKeyInput.press("Tab"); // Trigger blur to save value

// Verify the value was filled
const value = await tavilyApiKeyInput.inputValue();
if (value === process.env.TAVILY_API_KEY) {
break;
}

await page.waitForTimeout(500);
}

await page
.getByTestId("handle-parsercomponent-shownode-data or dataframe-left")
Expand Down
Loading