fix: update Tavily component in Instagram Copywriter and Market Research projects and tests (#5789)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-01-18 22:07:23 -03:00 • committed by GitHub
commit f5d9d53264
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 573 additions and 507 deletions

View file

@ -1,14 +1,9 @@
import { expect, test } from "@playwright/test";
import * as dotenv from "dotenv";
import path from "path";
import { addNewApiKeys } from "../../utils/add-new-api-keys";
import { adjustScreenView } from "../../utils/adjust-screen-view";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
import { getAllResponseMessage } from "../../utils/get-all-response-message";
import { initialGPTsetup } from "../../utils/initialGPTsetup";
import { removeOldApiKeys } from "../../utils/remove-old-api-keys";
import { selectGptModel } from "../../utils/select-gpt-model";
import { updateOldComponents } from "../../utils/update-old-components";
import { waitForOpenModalWithChatInput } from "../../utils/wait-for-open-modal";
test(
@ -41,9 +36,11 @@ test(
await initialGPTsetup(page);
// We have to get the rf__node because there are more components with popover-anchor-input-api_key
await page
.getByTestId(/rf__node-TavilySearchComponent-[A-Za-z0-9]{5}/)
.getByTestId("popover-anchor-input-api_key")
.nth(2)
.nth(0)
.fill(process.env.TAVILY_API_KEY ?? "");
await page.getByTestId("button_run_chat output").click();

View file

@ -34,8 +34,8 @@ test(
});
await initialGPTsetup(page);
await page
.getByTestId(/rf__node-TavilySearchComponent-[A-Za-z0-9]{5}/)
.getByTestId("popover-anchor-input-api_key")
.nth(0)
.fill(process.env.TAVILY_API_KEY ?? "");