improve: improve pythonGenerationCodeAPI (#5080)

fix: update flow creation test to wait for modal title

The code changes update the flow creation test in the pythonApiGeneration.spec.ts file. The test now waits for the modal title to appear before proceeding. This ensures that the test is more reliable and avoids any timing issues.
This commit is contained in:
anovazzi1
2024-12-05 22:28:16 -03:00
committed by GitHub
parent d92538e4e1
commit 9654ce7430

View File

@ -24,12 +24,13 @@ test(
while (modalCount === 0) {
await page.getByText("New Flow", { exact: true }).click();
await page.waitForTimeout(3000);
await page.waitForSelector('[data-testid="modal-title"]', {
timeout: 3000,
});
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await page.waitForTimeout(1000);
await page.getByText("API", { exact: true }).click();
await page.getByRole("tab", { name: "Python API" }).click();
await page.getByTestId("icon-Copy").click();