refactor: Improve reliability of flowPage.spec.ts test (#5070)
* test: Improve flowPage.spec.ts test reliability Enhance the reliability of the flowPage.spec.ts test by adding explicit wait conditions for the modal and sidebar components. This ensures that the test waits for the necessary elements to be present before interacting with them, reducing the likelihood of test failures due to timing issues.
This commit is contained in:
parent
78bd6962aa
commit
d60508ec85
1 changed files with 9 additions and 2 deletions
|
|
@ -23,13 +23,20 @@ test.describe("Flow Page tests", () => {
|
|||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(3000);
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector(
|
||||
'[data-testid="sidebar-custom-component-button"]',
|
||||
{
|
||||
timeout: 3000,
|
||||
},
|
||||
);
|
||||
|
||||
await page.getByTestId("sidebar-custom-component-button").click();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue