📎 Fix e2e tests

This commit is contained in:
Andrey Antukh
2026-02-23 16:21:54 +01:00
parent 23206bdef4
commit af3cd07f5a
2 changed files with 11 additions and 5 deletions

View File

@@ -432,6 +432,8 @@ export class WorkspacePage extends BaseWebSocketPage {
return content !== "";
}, { timeout: 1000 });
await this.page.waitForTimeout(3000);
}
/**
@@ -445,7 +447,8 @@ export class WorkspacePage extends BaseWebSocketPage {
await this.viewport.click({ button: "right" });
return this.page.getByText("Paste", { exact: true }).click();
}
return this.page.keyboard.press("ControlOrMeta+V");
await this.page.keyboard.press("ControlOrMeta+V");
await this.page.waitForTimeout(3000);
}
async panOnViewportAt(x, y, width, height) {

View File

@@ -383,24 +383,26 @@ test("User cut paste a component with path inside a variant", async ({
const variant = await findVariant(workspacePage, 0);
//Create a component
// Create a component
await workspacePage.ellipseShapeButton.click();
await workspacePage.clickWithDragViewportAt(500, 500, 20, 20);
await workspacePage.clickLeafLayer("Ellipse");
await workspacePage.page.keyboard.press("ControlOrMeta+k");
await workspacePage.page.waitForTimeout(3000);
//Rename the component
// Rename the component
await workspacePage.layers.getByText("Ellipse").dblclick();
await workspacePage.page
.getByTestId("layer-item")
.getByRole("textbox")
.pressSequentially("button / hover");
await workspacePage.page.keyboard.press("Enter");
await workspacePage.page.waitForTimeout(3000);
//Cut the component
// Cut the component
await workspacePage.cut("keyboard");
//Paste the component inside the variant
// Paste the component inside the variant
await variant.container.click();
await workspacePage.paste("keyboard");
@@ -427,6 +429,7 @@ test("User drag and drop a component with path inside a variant", async ({
await workspacePage.clickWithDragViewportAt(500, 500, 20, 20);
await workspacePage.clickLeafLayer("Ellipse");
await workspacePage.page.keyboard.press("ControlOrMeta+k");
await workspacePage.page.waitForTimeout(3000);
//Rename the component
await workspacePage.layers.getByText("Ellipse").dblclick();