Improve test reliability and performance in toggleComponent.spec.ts (#4927)
refactor: Improve test reliability and performance in toggleComponent.spec.ts
This commit is contained in:
parent
c816832b44
commit
438c3afdc9
1 changed files with 6 additions and 2 deletions
|
|
@ -25,7 +25,9 @@ test(
|
||||||
|
|
||||||
while (modalCount === 0) {
|
while (modalCount === 0) {
|
||||||
await page.getByText("New Flow", { exact: true }).click();
|
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();
|
modalCount = await page.getByTestId("modal-title")?.count();
|
||||||
}
|
}
|
||||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||||
|
|
@ -36,7 +38,9 @@ test(
|
||||||
await page.getByTestId("sidebar-search-input").click();
|
await page.getByTestId("sidebar-search-input").click();
|
||||||
await page.getByTestId("sidebar-search-input").fill("directory");
|
await page.getByTestId("sidebar-search-input").fill("directory");
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForSelector('[data-testid="dataDirectory"]', {
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
await page
|
await page
|
||||||
.getByTestId("dataDirectory")
|
.getByTestId("dataDirectory")
|
||||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue