refactor: Improve flow creation and search performance in test (#5139)
feat: Improve flow creation and search functionality Improve the flow creation and search functionality by adding explicit wait conditions for modals and search results. This ensures that the necessary elements are loaded before interacting with them, preventing potential errors or timeouts. Refactor the code in the 'generalBugs-shard-8.spec.ts' file to include the following changes: - Add a timeout of 3000ms for the modal title selector - Add a timeout of 3000ms for the dataAPI request selector These changes enhance the reliability and stability of the tests in the 'generalBugs-shard-8.spec.ts' file.
This commit is contained in:
parent
589358a7bd
commit
39335a7e47
1 changed files with 6 additions and 2 deletions
|
|
@ -25,14 +25,18 @@ test(
|
|||
|
||||
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.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("api request");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForSelector('[data-testid="dataAPI Request"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("dataAPI Request")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue