jomarko commented on code in PR #2239: URL: https://github.com/apache/incubator-kie-tools/pull/2239#discussion_r1567577488
########## packages/dmn-editor/tests/e2e/drdArtifacts/changeGroupProperties.spec.ts: ########## @@ -0,0 +1,114 @@ +/* + * 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 "../__fixtures__/base"; +import { DefaultNodeName, NodePosition, NodeType } from "../__fixtures__/nodes"; + +test.beforeEach(async ({ editor }) => { + await editor.open(); +}); + +test.describe("Change Properties - Group", () => { + test.beforeEach(async ({ palette, nodes, groupPropertiesPanel }) => { + await palette.dragNewNode({ type: NodeType.GROUP, targetPosition: { x: 100, y: 100 } }); + await nodes.select({ name: DefaultNodeName.GROUP, position: NodePosition.TOP }); + await groupPropertiesPanel.open(); + }); + + test("should change the Group node name", async ({ nodes, groupPropertiesPanel }) => { + await nodes.select({ name: DefaultNodeName.GROUP, position: NodePosition.TOP }); + await groupPropertiesPanel.setName({ newName: "Renamed Group" }); + + await nodes.select({ name: "Renamed Group", position: NodePosition.TOP }); + await expect(nodes.get({ name: "Renamed Group" })).toBeVisible(); + expect(await groupPropertiesPanel.getName()).toBe("Renamed Group"); + }); + + test("should change the Group node description", async ({ nodes, groupPropertiesPanel }) => { + await nodes.select({ name: DefaultNodeName.GROUP, position: NodePosition.TOP }); + await groupPropertiesPanel.setDescription({ + newDescription: "New Group Description", + }); + + await nodes.select({ name: DefaultNodeName.GROUP, position: NodePosition.TOP }); + expect(await groupPropertiesPanel.getDescription()).toBe("New Group Description"); + }); + + test("should change the Group node font", async ({ diagram, nodes, groupPropertiesPanel }) => { + await nodes.select({ name: DefaultNodeName.GROUP, position: NodePosition.TOP }); + await groupPropertiesPanel.setFont({ + fontSize: "40", + bold: true, + italic: true, + underline: true, + striketrough: true, + color: "#f12200", + fontFamily: "Verdana", + }); + + await expect(diagram.get()).toHaveScreenshot("change-group-font.png"); + }); + + test("should reset the Group node font", async ({ nodes, groupPropertiesPanel }) => { + test.skip(true, "https://github.com/apache/incubator-kie-issues/issues/1076"); Review Comment: Thank you for the comment. It is a topic I had also in mind, I mean usage `test.skip` and `test.info().annotations.push()`. To me it seemed not needed to use both, because in the test report I found and information about the skipped and the link for the issue. I mean for the `changeGroupProperties.spec.ts` the test report looks like below. There is link for the issue, that was a reason for skipping the test.  Then I compare it with `addAssociation.spec.ts` for example, I see there are two links, but I think there we really do two things, one workaround and one skip.  Maybe there is something that I miss in the understanding? To me it seems `changeGroupProperties.spec.ts` always need to do a skip and we do not do a workaround, or is your point I should use `test.info().annotations` but with different `TestAnnotations` constant? I see there are `REGRESSION` and `AFFECTED_BY` next to `WORKAROUND_DUE_TO` -- 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]
