Refactor actionsMainPage-shard-0.spec.ts (#5043)
* refactor: Add missing import and update assertions in actionsMainPage-shard-0.spec.ts
This commit is contained in:
parent
ab4a587039
commit
19232aa73b
1 changed files with 19 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { test } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test(
|
||||
"user should be able to download a flow or a component",
|
||||
|
|
@ -26,7 +26,9 @@ 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();
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +48,6 @@ test(
|
|||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
await page.getByTestId("icon-SaveAll").first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
if (await page.getByTestId("replace-button").isVisible()) {
|
||||
await page.getByTestId("replace-button").click();
|
||||
|
|
@ -65,26 +66,23 @@ test(
|
|||
await page.getByTestId("icon-ChevronLeft").last().click();
|
||||
await page.getByTestId("home-dropdown-menu").nth(0).click();
|
||||
await page.getByTestId("btn-download-json").last().click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText(/.*exported successfully/).isVisible();
|
||||
await expect(page.getByText(/.*exported successfully/)).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
await page.getByText("Flows", { exact: true }).click();
|
||||
await page.getByTestId("home-dropdown-menu").nth(0).click();
|
||||
await page.getByTestId("btn-download-json").last().click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByText(/.*exported successfully/)
|
||||
.last()
|
||||
.isVisible();
|
||||
await expect(page.getByText(/.*exported successfully/).last()).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
await page.getByText("Components", { exact: true }).click();
|
||||
await page.getByTestId("home-dropdown-menu").nth(0).click();
|
||||
await page.getByTestId("btn-download-json").last().click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.getByText(/.*exported successfully/)
|
||||
.last()
|
||||
.isVisible();
|
||||
await expect(page.getByText(/.*exported successfully/).last()).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -140,7 +138,9 @@ 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();
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,6 @@ test(
|
|||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
await page.getByTestId("icon-SaveAll").first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
if (await page.getByTestId("replace-button").isVisible()) {
|
||||
await page.getByTestId("replace-button").click();
|
||||
|
|
@ -185,7 +184,8 @@ test(
|
|||
await page.getByTestId("home-dropdown-menu").nth(1).click();
|
||||
await page.getByTestId("btn-duplicate-flow").last().click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Items duplicated successfully").isVisible();
|
||||
await expect(page.getByText("Flow duplicated successfully")).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue