jomarko commented on code in PR #2158: URL: https://github.com/apache/incubator-kie-tools/pull/2158#discussion_r1489502987
########## packages/dmn-editor/tests/e2e/connections/betweenTwoExistingNodes.spec.ts: ########## @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { test, expect } from "@playwright/test"; +import { env } from "../../../env"; + +test.beforeEach(async ({ page }, testInfo) => { + await page.goto( + `http://localhost:${env.dmnEditor.storybook.port}/iframe.html?args=&id=example-dmndevwebapp--empty-model&viewMode=story` + ); +}); + +test.describe("Connect two existing nodes", () => { + test("InputData -> Decision", async ({ page }) => { + // Add two nodes + await page + .getByTitle("Decision", { exact: true }) + .dragTo(page.getByTestId("rf__wrapper"), { targetPosition: { x: 100, y: 100 } }); + await page + .getByTitle("Input Data", { exact: true }) + .dragTo(page.getByTestId("rf__wrapper"), { targetPosition: { x: 100, y: 300 } }); + + // Connect these nodes + // await page.getByText("New Input Data").hover(); + await page.getByTitle("edge_informationRequirement").locator("visible=true").dragTo(page.getByText("New Decision")); + + expect(await page.screenshot()).toMatchSnapshot(); + }); Review Comment: and if you check screenshots, you will notice two interesting points: all tests do the same, most of them cause 'Undo' button tells us there is one operation to undo. However some tests did screenshot where this undo count is still 0: - https://github.com/apache/incubator-kie-tools/pull/2158/files#diff-9e58493e9f1070103da26624d5a11f9fb94d4e00d493c7b82c844b013bda5abd and second point is, I am not able to connect existing node with existing text annotation, see: - https://github.com/apache/incubator-kie-tools/pull/2158/files#diff-dc850d2ea99b8e82faadfd98e8808f978e2a95df1243b3d01bca484cf8b80993 - https://github.com/apache/incubator-kie-tools/pull/2158/files#diff-e77dd45ba9a10d24edb0cc8c9a96a86c33a18a04d00298edd54ce827d9bdf1f6 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
