Refactor: update chatInputOutput.spec.ts to improve test reliability and performance (#4853)

Refactor chatInputOutput.spec.ts to improve test reliability and performance
This commit is contained in:
anovazzi1 2024-11-27 17:16:52 -03:00 committed by GitHub
commit b9f312cfb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,7 +23,9 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
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();
}
@ -37,7 +39,9 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
});
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("chat output");
await page.waitForTimeout(1000);
await page.waitForSelector('[data-testid="outputsChat Output"]', {
timeout: 2000,
});
await page
.getByTestId("outputsChat Output")
@ -47,7 +51,9 @@ test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("chat input");
await page.waitForTimeout(1000);
await page.waitForSelector('[data-testid="inputsChat Input"]', {
timeout: 2000,
});
await page
.getByTestId("inputsChat Input")