test: Enhance tool mode spec with zoom controls and drag-drop functionality (#5363)
✨ (tool-mode.spec.ts): add zoomOut utility function to enable zooming out on the page 📝 (tool-mode.spec.ts): update test case to include zooming out functionality using the new zoomOut utility function
This commit is contained in:
parent
e6bacbf98b
commit
ba7380824c
1 changed files with 9 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
||||
test(
|
||||
"User should be able to use components as tool",
|
||||
|
|
@ -113,17 +114,22 @@ test(
|
|||
|
||||
await page.getByTestId("disclosure-agents").click();
|
||||
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
||||
await zoomOut(page, 4);
|
||||
|
||||
await page.waitForSelector('[data-testid="agentsAgent"]', {
|
||||
timeout: 3000,
|
||||
state: "visible",
|
||||
});
|
||||
await page
|
||||
.getByTestId("agentsAgent")
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("add-component-button-agent").click();
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 350, y: 100 },
|
||||
});
|
||||
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
||||
// Move the Agent node a bit
|
||||
|
||||
await page.getByTestId("handle-url-shownode-toolset-right").first().click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue