mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 10:50:35 +08:00
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:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user