(deleteComponentFlows.spec.ts): remove redundant waitFor calls and use waitForSelector for consistency

This commit is contained in:
cristhianzl 2024-06-26 22:40:02 -03:00 committed by Gabriel Luiz Freitas Almeida
commit f4e71f4982

View file

@ -32,11 +32,6 @@ test("should delete a flow", async ({ page }) => {
await page.getByText("Website Content QA").first().isVisible();
await page.getByLabel("checkbox-component").last().waitFor({
state: "visible",
timeout: 30000, // Timeout of 30 seconds
});
await page.waitForSelector('[data-testid="checkbox-component"]', {
timeout: 100000,
});
@ -62,12 +57,12 @@ test("should delete a component", async ({ page }) => {
await page.getByText("Components").first().click();
await page.getByText("Basic RAG").first().isVisible();
await page.getByLabel("checkbox-component").last().waitFor({
state: "visible",
timeout: 30000, // Timeout of 30 seconds
await page.waitForSelector('[data-testid="checkbox-component"]', {
timeout: 100000,
});
await page.getByLabel("checkbox-component").first().click();
await page.getByTestId("checkbox-component").first().click();
await page.getByTestId("icon-Trash2").click();
await page
.getByText("Are you sure you want to delete the selected component?")