test: Fix race condition in rename flow test (#11549)

This commit is contained in:
Cristhian Zanforlin Lousa
2026-02-03 07:26:23 -03:00
committed by GitHub
parent 732cf45979
commit a24409e6bc

View File

@ -39,6 +39,17 @@ export const renameFlow = async (
await page.waitForSelector('[data-testid="sidebar-search-input"]', {
timeout: 30000,
});
if (flowName) {
await page.waitForFunction(
(expected) => {
const header = document.querySelector('[data-testid="flow_name"]');
return header && header.textContent?.trim() === expected;
},
flowName,
{ timeout: 30000 },
);
}
} else {
await page.getByTestId("save-flow-settings").isDisabled({ timeout: 3000 });
await page.getByTestId("cancel-flow-settings").isEnabled({ timeout: 3000 });