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
commit 9654ce7430
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();