From f2532467144403037098359c4a8d546cb7fe92c5 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 7 Jan 2025 13:42:03 -0300 Subject: [PATCH] Refactor: update selectors in outdated message test (#5079) * fix: add missing imports and update selectors in outdated message test * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .../extended/features/outdated-message.spec.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/frontend/tests/extended/features/outdated-message.spec.ts b/src/frontend/tests/extended/features/outdated-message.spec.ts index 677f36849..dfb8215a8 100644 --- a/src/frontend/tests/extended/features/outdated-message.spec.ts +++ b/src/frontend/tests/extended/features/outdated-message.spec.ts @@ -1,4 +1,4 @@ -import { test } from "@playwright/test"; +import { expect, test } from "@playwright/test"; import { readFileSync } from "fs"; import { awaitBootstrapTest } from "../../utils/await-bootstrap-test"; @@ -27,7 +27,9 @@ test("user must be able outdated message on error", async ({ page }) => { dataTransfer, }); - await page.waitForTimeout(3000); + await page.waitForSelector("data-testid=list-card", { + timeout: 3000, + }); await page.getByTestId("list-card").first().click(); @@ -37,8 +39,7 @@ test("user must be able outdated message on error", async ({ page }) => { await page.getByTestId("button_run_chat output").click(); - await page.waitForSelector("text=there are outdated components in the flow", { - timeout: 30000, - state: "visible", - }); + await expect( + page.getByText("there are outdated components in the flow"), + ).toBeVisible({ timeout: 30000 }); });