refactor: enhance freeze.spec.ts by replacing timeout with waitForSelector for improved test reliability

- Updated the test to use waitForSelector instead of a fixed timeout, enhancing the robustness of the test execution.
- This change aims to ensure that the test waits for the specific element to be present before proceeding, reducing flakiness.
This commit is contained in:
Gabriel Luiz Freitas Almeida
2025-06-18 13:28:53 -03:00
parent 1a9d66f94d
commit 42eccbfa0d

View File

@ -70,8 +70,12 @@ test(
await page.keyboard.press("Escape");
await page.getByTestId("div-generic-node").getByRole("button").click();
await page.waitForTimeout(2000);
await page.waitForSelector(
'[data-testid="output-inspection-output text-textinput"]',
{
timeout: 2000,
},
);
await page.getByTestId("output-inspection-output text-textinput").click();