diff --git a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx
index 47028ff6cbd..7af4cde7086 100644
--- a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx
+++ b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx
@@ -373,23 +373,24 @@ export function FontOptions({ startExpanded, nodeIds }: { startExpanded: boolean
-
+
+
+
)}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/base.ts b/packages/dmn-editor/tests/e2e/__fixtures__/base.ts
index b220096cd8a..5f39b860faa 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/base.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/base.ts
@@ -24,12 +24,15 @@ import { Nodes } from "./nodes";
import { Editor } from "./editor";
import { Edges } from "./edges";
import { JsonModel } from "./jsonModel";
-import { GeneralProperties } from "./propertiesPanel/generalProperties";
-import { PropertiesPanelBase } from "./propertiesPanel/propertiesPanelBase";
-import { ContainerNodeGeneralProperties } from "./propertiesPanel/containerNodeGeneralProperties";
-import { DecisionProperties } from "./propertiesPanel/decisionProperties";
-import { KnowledgeSourceProperties } from "./propertiesPanel/knowledgeSourceProperties";
-import { TextAnnotationProperties } from "./propertiesPanel/textAnnotationProperties";
+import { DecisionServicePropertiesPanel } from "./propertiesPanel/decisionServicePropertiesPanel";
+import { DecisionPropertiesPanel } from "./propertiesPanel/decisionPropertiesPanel";
+import { KnowledgeSourcePropertiesPanel } from "./propertiesPanel/knowledgeSourcePropertiesPanel";
+import { TextAnnotationProperties as TextAnnotationPropertiesPanel } from "./propertiesPanel/textAnnotationPropertiesPanel";
+import { BkmPropertiesPanel } from "./propertiesPanel/bkmPropertiesPanel";
+import { InputDataPropertiesPanel } from "./propertiesPanel/inputDataPropertiesPanel";
+import { GroupPropertiesPanel } from "./propertiesPanel/groupPropertiesPanel";
+import { DiagramPropertiesPanel } from "./propertiesPanel/diagramPropertiesPanel";
+import { MultipleNodesPropertiesPanel } from "./propertiesPanel/multipleNodesPropertiesPanel";
type DmnEditorFixtures = {
diagram: Diagram;
@@ -38,12 +41,15 @@ type DmnEditorFixtures = {
jsonModel: JsonModel;
nodes: Nodes;
palette: Palette;
- generalProperties: GeneralProperties;
- decisionProperties: DecisionProperties;
- knowledgeSourceProperties: KnowledgeSourceProperties;
- textAnnotationProperties: TextAnnotationProperties;
- propertiesPanel: PropertiesPanelBase;
- containerNodeGeneralProperties: ContainerNodeGeneralProperties;
+ bkmPropertiesPanel: BkmPropertiesPanel;
+ decisionPropertiesPanel: DecisionPropertiesPanel;
+ decisionServicePropertiesPanel: DecisionServicePropertiesPanel;
+ diagramPropertiesPanel: DiagramPropertiesPanel;
+ groupPropertiesPanel: GroupPropertiesPanel;
+ inputDataPropertiesPanel: InputDataPropertiesPanel;
+ knowledgeSourcePropertiesPanel: KnowledgeSourcePropertiesPanel;
+ multipleNodesPropertiesPanel: MultipleNodesPropertiesPanel;
+ textAnnotationPropertiesPanel: TextAnnotationPropertiesPanel;
};
export const test = base.extend({
@@ -65,23 +71,32 @@ export const test = base.extend({
palette: async ({ page, diagram, nodes }, use) => {
await use(new Palette(page, diagram, nodes));
},
- generalProperties: async ({ diagram, nodes, page }, use) => {
- await use(new GeneralProperties(diagram, nodes, page));
+ bkmPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new BkmPropertiesPanel(diagram, nodes, page));
},
- decisionProperties: async ({ diagram, nodes, page }, use) => {
- await use(new DecisionProperties(diagram, nodes, page));
+ decisionPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new DecisionPropertiesPanel(diagram, nodes, page));
},
- knowledgeSourceProperties: async ({ diagram, nodes, page }, use) => {
- await use(new KnowledgeSourceProperties(diagram, nodes, page));
+ decisionServicePropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new DecisionServicePropertiesPanel(diagram, nodes, page));
},
- textAnnotationProperties: async ({ diagram, nodes, page }, use) => {
- await use(new TextAnnotationProperties(diagram, nodes, page));
+ diagramPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new DiagramPropertiesPanel(diagram, nodes, page));
},
- propertiesPanel: async ({ diagram, nodes, page }, use) => {
- await use(new PropertiesPanelBase(diagram, nodes, page));
+ groupPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new GroupPropertiesPanel(diagram, nodes, page));
},
- containerNodeGeneralProperties: async ({ diagram, nodes, page }, use) => {
- await use(new ContainerNodeGeneralProperties(diagram, nodes, page));
+ knowledgeSourcePropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new KnowledgeSourcePropertiesPanel(diagram, nodes, page));
+ },
+ inputDataPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new InputDataPropertiesPanel(diagram, nodes, page));
+ },
+ multipleNodesPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new MultipleNodesPropertiesPanel(diagram, nodes, page));
+ },
+ textAnnotationPropertiesPanel: async ({ diagram, nodes, page }, use) => {
+ await use(new TextAnnotationPropertiesPanel(diagram, nodes, page));
},
});
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts
new file mode 100644
index 00000000000..ddffcabc526
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts
@@ -0,0 +1,22 @@
+/*
+ * 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 { PropertiesPanelBase } from "./propertiesPanelBase";
+
+export class BkmPropertiesPanel extends PropertiesPanelBase {}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionProperties.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts
similarity index 88%
rename from packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionProperties.ts
rename to packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts
index eda0cdc7d8f..98e94f52813 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionProperties.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts
@@ -19,8 +19,8 @@
import { PropertiesPanelBase } from "./propertiesPanelBase";
-export class DecisionProperties extends PropertiesPanelBase {
- public async changeNodeQuestion(args: { nodeName: string; newQuestion: string }) {
+export class DecisionPropertiesPanel extends PropertiesPanelBase {
+ public async setQuestion(args: { nodeName: string; newQuestion: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter a question...").fill(args.newQuestion);
// commit changes by click to the diagram
@@ -32,7 +32,7 @@ export class DecisionProperties extends PropertiesPanelBase {
return await this.panel().getByPlaceholder("Enter a question...").inputValue();
}
- public async changeNodeAllowedAnswers(args: { nodeName: string; newAllowedAnswers: string }) {
+ public async setAllowedAnswers(args: { nodeName: string; newAllowedAnswers: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter allowed answers...").fill(args.newAllowedAnswers);
// commit changes by click to the diagram
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts
new file mode 100644
index 00000000000..33a7f6bdad5
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts
@@ -0,0 +1,27 @@
+/*
+ * 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 { NodePosition } from "../nodes";
+import { PropertiesPanelBase } from "./propertiesPanelBase";
+
+export class DecisionServicePropertiesPanel extends PropertiesPanelBase {
+ public async selectNodeByClickToAppropriatePosition(args: { nodeName: string }) {
+ await this.nodes.select({ name: args.nodeName, position: NodePosition.TOP });
+ }
+}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts
new file mode 100644
index 00000000000..b9f1649df6a
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts
@@ -0,0 +1,22 @@
+/*
+ * 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 { PropertiesPanelBase } from "./propertiesPanelBase";
+
+export class DiagramPropertiesPanel extends PropertiesPanelBase {}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/generalProperties.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/generalProperties.ts
deleted file mode 100644
index 53a68c7f81e..00000000000
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/generalProperties.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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 { DataType } from "../jsonModel";
-import { PropertiesPanelBase } from "./propertiesPanelBase";
-
-export class GeneralProperties extends PropertiesPanelBase {
- public async changeNodeName(args: { from: string; to: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.from });
- await this.panel().getByPlaceholder("Enter a name...").fill(args.to);
- await this.page.keyboard.press("Enter");
- }
-
- public async changeNodeDataType(args: { nodeName: string; newDataType: DataType }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByPlaceholder("Select a data type...").click();
- await this.page.getByRole("option").getByText(args.newDataType, { exact: true }).click();
- }
-
- public async changeNodeDescription(args: { nodeName: string; newDescription: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByPlaceholder("Enter a description...").fill(args.newDescription);
-
- // commit changes by click to the diagram
- await this.diagram.resetFocus();
- }
-
- public async getNodeDescription(args: { nodeName: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- return await this.panel().getByPlaceholder("Enter a description...").inputValue();
- }
-
- public async addDocumentationLink(args: { nodeName: string; linkText: string; linkHref: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByTitle("Add documentation link").click();
- await this.panel()
- .locator(".kie-dmn-editor--documentation-link--row")
- .getByPlaceholder("Enter a title...")
- .fill(args.linkText);
- await this.panel()
- .locator(".kie-dmn-editor--documentation-link--row")
- .getByPlaceholder("http://")
- .fill(args.linkHref);
- await this.page.keyboard.press("Enter");
- }
-
- public async getDocumentationLinks(args: { nodeName: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- return await this.panel().locator(".kie-dmn-editor--documentation-link--row-title").locator("a").all();
- }
-
- public async changeNodeFont(args: { nodeName: string; newFont: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByTitle("Expand / collapse Font").click();
-
- await this.panel().locator("[data-ouia-component-id='node-font-style-selector']").click();
- await this.panel().getByText(args.newFont).click();
-
- await this.diagram.resetFocus();
- }
-
- public async getNodeFont(args: { nodeName: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByTitle("Expand / collapse Font").click();
-
- return await this.panel().locator("[data-ouia-component-id='node-font-style-selector']").textContent();
- }
-
- public async getNodeShape(args: { nodeName: string }) {
- await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
- await this.panel().getByTitle("Expand / collapse Shape").click();
-
- const width = await this.panel().getByTestId("node-shape-width-input-box").inputValue();
- const height = await this.panel().getByTestId("node-shape-height-input-box").inputValue();
-
- await this.panel().getByTitle("Expand / collapse Shape").click();
-
- return { width: width, height: height };
- }
-}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/containerNodeGeneralProperties.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts
similarity index 89%
rename from packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/containerNodeGeneralProperties.ts
rename to packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts
index 72086b2a9a1..a3150b15a37 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/containerNodeGeneralProperties.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts
@@ -18,12 +18,11 @@
*/
import { NodePosition } from "../nodes";
-import { GeneralProperties } from "./generalProperties";
-
+import { PropertiesPanelBase } from "./propertiesPanelBase";
/**
* Please use this fixture for manipulation with 'Decision Service' and 'Group' nodes
*/
-export class ContainerNodeGeneralProperties extends GeneralProperties {
+export class GroupPropertiesPanel extends PropertiesPanelBase {
public async selectNodeByClickToAppropriatePosition(args: { nodeName: string }) {
await this.nodes.select({ name: args.nodeName, position: NodePosition.TOP });
}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts
new file mode 100644
index 00000000000..23a4d0b5887
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts
@@ -0,0 +1,22 @@
+/*
+ * 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 { PropertiesPanelBase } from "./propertiesPanelBase";
+
+export class InputDataPropertiesPanel extends PropertiesPanelBase {}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourceProperties.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts
similarity index 88%
rename from packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourceProperties.ts
rename to packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts
index 2b4ce35778d..8155dc6c3a2 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourceProperties.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts
@@ -19,8 +19,8 @@
import { PropertiesPanelBase } from "./propertiesPanelBase";
-export class KnowledgeSourceProperties extends PropertiesPanelBase {
- public async changeNodeSourceType(args: { nodeName: string; newSourceType: string }) {
+export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase {
+ public async setSourceType(args: { nodeName: string; newSourceType: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter source type...").fill(args.newSourceType);
// commit changes by click to the diagram
@@ -32,7 +32,7 @@ export class KnowledgeSourceProperties extends PropertiesPanelBase {
return await this.panel().getByPlaceholder("Enter source type...").inputValue();
}
- public async changeNodeLocationURI(args: { nodeName: string; newLocationURI: string }) {
+ public async setLocationURI(args: { nodeName: string; newLocationURI: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter location URI...").fill(args.newLocationURI);
// commit changes by click to the diagram
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts
new file mode 100644
index 00000000000..dc9bb0ff6df
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts
@@ -0,0 +1,22 @@
+/*
+ * 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 { PropertiesPanelBase } from "./propertiesPanelBase";
+
+export class MultipleNodesPropertiesPanel extends PropertiesPanelBase {}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/propertiesPanelBase.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/propertiesPanelBase.ts
index 681376f65f5..e34c73da2e2 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/propertiesPanelBase.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/propertiesPanelBase.ts
@@ -20,8 +20,9 @@
import { Page } from "@playwright/test";
import { Diagram } from "../diagram";
import { NodePosition, Nodes } from "../nodes";
+import { DataType } from "../jsonModel";
-export class PropertiesPanelBase {
+export abstract class PropertiesPanelBase {
constructor(public diagram: Diagram, public nodes: Nodes, public page: Page) {}
public panel() {
@@ -35,4 +36,82 @@ export class PropertiesPanelBase {
public async open() {
await this.page.getByTitle("Properties panel").click();
}
+
+ public async setName(args: { from: string; to: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.from });
+ await this.panel().getByPlaceholder("Enter a name...").fill(args.to);
+ await this.page.keyboard.press("Enter");
+ }
+
+ public async getName(args: { nodeName: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ return await this.panel().getByPlaceholder("Enter a name...").inputValue();
+ }
+
+ public async setDataType(args: { nodeName: string; newDataType: DataType }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByPlaceholder("Select a data type...").click();
+ await this.page.getByRole("option").getByText(args.newDataType, { exact: true }).click();
+ }
+
+ public async setDescription(args: { nodeName: string; newDescription: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByPlaceholder("Enter a description...").fill(args.newDescription);
+
+ // commit changes by click to the diagram
+ await this.diagram.resetFocus();
+ }
+
+ public async getNodeDescription(args: { nodeName: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ return await this.panel().getByPlaceholder("Enter a description...").inputValue();
+ }
+
+ public async addDocumentationLink(args: { nodeName: string; linkText: string; linkHref: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByTitle("Add documentation link").click();
+ await this.panel()
+ .locator(".kie-dmn-editor--documentation-link--row")
+ .getByPlaceholder("Enter a title...")
+ .fill(args.linkText);
+ await this.panel()
+ .locator(".kie-dmn-editor--documentation-link--row")
+ .getByPlaceholder("http://")
+ .fill(args.linkHref);
+ await this.page.keyboard.press("Enter");
+ }
+
+ public async getDocumentationLinks(args: { nodeName: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ return await this.panel().locator(".kie-dmn-editor--documentation-link--row-title").locator("a").all();
+ }
+
+ public async setFont(args: { nodeName: string; newFont: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByTitle("Expand / collapse Font").click();
+
+ await this.panel().getByTestId("node-font-style-selector").click();
+ await this.panel().getByText(args.newFont).click();
+
+ await this.diagram.resetFocus();
+ }
+
+ public async getNodeFont(args: { nodeName: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByTitle("Expand / collapse Font").click();
+
+ return await this.panel().getByTestId("node-font-style-selector").textContent();
+ }
+
+ public async getNodeShape(args: { nodeName: string }) {
+ await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
+ await this.panel().getByTitle("Expand / collapse Shape").click();
+
+ const width = await this.panel().getByTestId("node-shape-width-input-box").inputValue();
+ const height = await this.panel().getByTestId("node-shape-height-input-box").inputValue();
+
+ await this.panel().getByTitle("Expand / collapse Shape").click();
+
+ return { width: width, height: height };
+ }
}
diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationProperties.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts
similarity index 92%
rename from packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationProperties.ts
rename to packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts
index 2de3161ddb2..f863e98b28f 100644
--- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationProperties.ts
+++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts
@@ -20,7 +20,7 @@
import { PropertiesPanelBase } from "./propertiesPanelBase";
export class TextAnnotationProperties extends PropertiesPanelBase {
- public async changeNodeFormat(args: { nodeName: string; newFormat: string }) {
+ public async setFormat(args: { nodeName: string; newFormat: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter a text format...").fill(args.newFormat);
// commit changes by click to the diagram
@@ -32,7 +32,7 @@ export class TextAnnotationProperties extends PropertiesPanelBase {
return await this.panel().getByPlaceholder("Enter a text format...").inputValue();
}
- public async changeNodeText(args: { nodeName: string; newText: string }) {
+ public async setText(args: { nodeName: string; newText: string }) {
await this.selectNodeByClickToAppropriatePosition({ nodeName: args.nodeName });
await this.panel().getByPlaceholder("Enter text...").fill(args.newText);
// commit changes by click to the diagram
diff --git a/packages/dmn-editor/tests/e2e/drdArtifacts/changeGroupProperties.spec.ts b/packages/dmn-editor/tests/e2e/drdArtifacts/changeGroupProperties.spec.ts
index fdb61308762..de3d6a55e63 100644
--- a/packages/dmn-editor/tests/e2e/drdArtifacts/changeGroupProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drdArtifacts/changeGroupProperties.spec.ts
@@ -25,36 +25,37 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - Group", () => {
- test.beforeEach(async ({ palette, nodes, containerNodeGeneralProperties }) => {
+ 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 containerNodeGeneralProperties.open();
+ await groupPropertiesPanel.open();
});
- test("should change the Group node name", async ({ nodes, containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeName({ from: DefaultNodeName.GROUP, to: "Renamed Group" });
+ test("should change the Group node name", async ({ nodes, groupPropertiesPanel }) => {
+ await groupPropertiesPanel.setName({ from: DefaultNodeName.GROUP, to: "Renamed Group" });
await expect(nodes.get({ name: "Renamed Group" })).toBeVisible();
+ expect(await groupPropertiesPanel.getName({ nodeName: "Renamed Group" })).toBe("Renamed Group");
});
- test("should change the Group node description", async ({ containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeDescription({
+ test("should change the Group node description", async ({ groupPropertiesPanel }) => {
+ await groupPropertiesPanel.setDescription({
nodeName: DefaultNodeName.GROUP,
newDescription: "New Group Description",
});
- expect(await containerNodeGeneralProperties.getNodeDescription({ nodeName: DefaultNodeName.GROUP })).toBe(
+ expect(await groupPropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.GROUP })).toBe(
"New Group Description"
);
});
- test("should change the Group node font - family", async ({ containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeFont({ nodeName: DefaultNodeName.GROUP, newFont: "Verdana" });
+ test("should change the Group node font - family", async ({ groupPropertiesPanel }) => {
+ await groupPropertiesPanel.setFont({ nodeName: DefaultNodeName.GROUP, newFont: "Verdana" });
- expect(await containerNodeGeneralProperties.getNodeFont({ nodeName: DefaultNodeName.GROUP })).toBe("Verdana");
+ expect(await groupPropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.GROUP })).toBe("Verdana");
});
- test.skip("should change the Group node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the Group node shape - background color", async ({ nodes, groupPropertiesPanel }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drdArtifacts/changeTextAnnotationProperties.spec.ts b/packages/dmn-editor/tests/e2e/drdArtifacts/changeTextAnnotationProperties.spec.ts
index ad2654c6656..a330dd13bc6 100644
--- a/packages/dmn-editor/tests/e2e/drdArtifacts/changeTextAnnotationProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drdArtifacts/changeTextAnnotationProperties.spec.ts
@@ -25,50 +25,55 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - Text Annotation", () => {
- test.beforeEach(async ({ palette, nodes, propertiesPanel }) => {
+ test.beforeEach(async ({ palette, nodes, textAnnotationPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.TEXT_ANNOTATION, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.TEXT_ANNOTATION });
- await propertiesPanel.open();
+ await textAnnotationPropertiesPanel.open();
});
- test("should change the Text Annotation node Format", async ({ textAnnotationProperties }) => {
- await textAnnotationProperties.changeNodeFormat({
+ test("should change the Text Annotation node Format", async ({ textAnnotationPropertiesPanel }) => {
+ await textAnnotationPropertiesPanel.setFormat({
nodeName: DefaultNodeName.TEXT_ANNOTATION,
newFormat: "plaintext",
});
- expect(await textAnnotationProperties.getNodeFormat({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe(
+ expect(await textAnnotationPropertiesPanel.getNodeFormat({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe(
"plaintext"
);
});
- test("should change the Text Annotation node Text", async ({ textAnnotationProperties }) => {
- await textAnnotationProperties.changeNodeText({
+ test("should change the Text Annotation node Text", async ({ textAnnotationPropertiesPanel }) => {
+ await textAnnotationPropertiesPanel.setText({
nodeName: DefaultNodeName.TEXT_ANNOTATION,
newText: "new text content",
});
- expect(await textAnnotationProperties.getNodeText({ nodeName: "new text content" })).toBe("new text content");
+ expect(await textAnnotationPropertiesPanel.getNodeText({ nodeName: "new text content" })).toBe("new text content");
});
- test("should change the Text Annotation node description", async ({ generalProperties }) => {
- await generalProperties.changeNodeDescription({
+ test("should change the Text Annotation node description", async ({ textAnnotationPropertiesPanel }) => {
+ await textAnnotationPropertiesPanel.setDescription({
nodeName: DefaultNodeName.TEXT_ANNOTATION,
newDescription: "New Text Annotation Description",
});
- expect(await generalProperties.getNodeDescription({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe(
+ expect(await textAnnotationPropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe(
"New Text Annotation Description"
);
});
- test("should change the Text Annotation node font - family", async ({ generalProperties }) => {
- await generalProperties.changeNodeFont({ nodeName: DefaultNodeName.TEXT_ANNOTATION, newFont: "Verdana" });
+ test("should change the Text Annotation node font - family", async ({ textAnnotationPropertiesPanel }) => {
+ await textAnnotationPropertiesPanel.setFont({ nodeName: DefaultNodeName.TEXT_ANNOTATION, newFont: "Verdana" });
- expect(await generalProperties.getNodeFont({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe("Verdana");
+ expect(await textAnnotationPropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).toBe(
+ "Verdana"
+ );
});
- test.skip("should change the Text Annotation node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the Text Annotation node shape - background color", async ({
+ nodes,
+ textAnnotationPropertiesPanel,
+ }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drdArtifacts/resizeGroup.spec.ts b/packages/dmn-editor/tests/e2e/drdArtifacts/resizeGroup.spec.ts
index cd01ff72a69..4c83171ce19 100644
--- a/packages/dmn-editor/tests/e2e/drdArtifacts/resizeGroup.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drdArtifacts/resizeGroup.spec.ts
@@ -25,25 +25,23 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Group", () => {
- test("should resize Group node", async ({ palette, nodes, containerNodeGeneralProperties }) => {
+ test("should resize Group node", async ({ palette, nodes, groupPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.GROUP, targetPosition: { x: 300, y: 300 } });
await nodes.resize({ nodeName: DefaultNodeName.GROUP, position: NodePosition.TOP, xOffset: 50, yOffset: 50 });
- await containerNodeGeneralProperties.open();
+ await groupPropertiesPanel.open();
await expect(
(
- await containerNodeGeneralProperties.getNodeShape({
+ await groupPropertiesPanel.getNodeShape({
nodeName: DefaultNodeName.GROUP,
- position: NodePosition.TOP,
})
).width
).toEqual("360");
await expect(
(
- await containerNodeGeneralProperties.getNodeShape({
+ await groupPropertiesPanel.getNodeShape({
nodeName: DefaultNodeName.GROUP,
- position: NodePosition.TOP,
})
).height
).toEqual("360");
diff --git a/packages/dmn-editor/tests/e2e/drdArtifacts/resizeTextAnnotation.spec.ts b/packages/dmn-editor/tests/e2e/drdArtifacts/resizeTextAnnotation.spec.ts
index 761c9f81e72..e8858729e64 100644
--- a/packages/dmn-editor/tests/e2e/drdArtifacts/resizeTextAnnotation.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drdArtifacts/resizeTextAnnotation.spec.ts
@@ -25,7 +25,7 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Text Annotation", () => {
- test("should resize Text Annotation node", async ({ palette, nodes, generalProperties }) => {
+ test("should resize Text Annotation node", async ({ palette, nodes, textAnnotationPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.TEXT_ANNOTATION, targetPosition: { x: 100, y: 100 } });
await nodes.resize({
@@ -35,12 +35,16 @@ test.describe("Resize node - Text Annotation", () => {
yOffset: 50,
});
- await generalProperties.open();
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).width).toEqual(
- "240"
- );
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.TEXT_ANNOTATION })).height).toEqual(
- "240"
- );
+ await textAnnotationPropertiesPanel.open();
+ await expect(
+ (
+ await textAnnotationPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.TEXT_ANNOTATION })
+ ).width
+ ).toEqual("240");
+ await expect(
+ (
+ await textAnnotationPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.TEXT_ANNOTATION })
+ ).height
+ ).toEqual("240");
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeBKMProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeBkmProperties.spec.ts
similarity index 61%
rename from packages/dmn-editor/tests/e2e/drgElements/changeBKMProperties.spec.ts
rename to packages/dmn-editor/tests/e2e/drgElements/changeBkmProperties.spec.ts
index 3f52d6f24b1..2c209321f73 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/changeBKMProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeBkmProperties.spec.ts
@@ -26,20 +26,21 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - BKM", () => {
- test.beforeEach(async ({ palette, nodes, propertiesPanel }) => {
+ test.beforeEach(async ({ palette, nodes, bkmPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.BKM, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.BKM });
- await propertiesPanel.open();
+ await bkmPropertiesPanel.open();
});
- test("should change the BKM node name", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeName({ from: DefaultNodeName.BKM, to: "Renamed BKM" });
+ test("should change the BKM node name", async ({ nodes, bkmPropertiesPanel }) => {
+ await bkmPropertiesPanel.setName({ from: DefaultNodeName.BKM, to: "Renamed BKM" });
await expect(nodes.get({ name: "Renamed BKM" })).toBeVisible();
+ expect(await bkmPropertiesPanel.getName({ nodeName: "Renamed BKM" })).toBe("Renamed BKM");
});
- test("should change the BKM node data type", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeDataType({ nodeName: DefaultNodeName.BKM, newDataType: DataType.Number });
+ test("should change the BKM node data type", async ({ nodes, bkmPropertiesPanel }) => {
+ await bkmPropertiesPanel.setDataType({ nodeName: DefaultNodeName.BKM, newDataType: DataType.Number });
await nodes.hover({ name: DefaultNodeName.BKM });
await expect(nodes.get({ name: DefaultNodeName.BKM }).getByPlaceholder("Select a data type...")).toHaveValue(
@@ -47,35 +48,35 @@ test.describe("Change Properties - BKM", () => {
);
});
- test("should change the BKM node description", async ({ generalProperties }) => {
- await generalProperties.changeNodeDescription({
+ test("should change the BKM node description", async ({ bkmPropertiesPanel }) => {
+ await bkmPropertiesPanel.setDescription({
nodeName: DefaultNodeName.BKM,
newDescription: "New BKM Description",
});
- expect(await generalProperties.getNodeDescription({ nodeName: DefaultNodeName.BKM })).toBe("New BKM Description");
+ expect(await bkmPropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.BKM })).toBe("New BKM Description");
});
- test("should change the BKM node documentation links", async ({ generalProperties }) => {
- await generalProperties.addDocumentationLink({
+ test("should change the BKM node documentation links", async ({ bkmPropertiesPanel }) => {
+ await bkmPropertiesPanel.addDocumentationLink({
nodeName: DefaultNodeName.BKM,
linkText: "Link Text",
linkHref: "http://link.test.com",
});
- const links = await generalProperties.getDocumentationLinks({ nodeName: DefaultNodeName.BKM });
+ const links = await bkmPropertiesPanel.getDocumentationLinks({ nodeName: DefaultNodeName.BKM });
expect(links).toHaveLength(1);
expect(links[0]).toHaveText("Link Text");
expect(links[0]).toHaveAttribute("href", "http://link.test.com/");
});
- test("should change the BKM node font - family", async ({ generalProperties }) => {
- await generalProperties.changeNodeFont({ nodeName: DefaultNodeName.BKM, newFont: "Verdana" });
+ test("should change the BKM node font - family", async ({ bkmPropertiesPanel }) => {
+ await bkmPropertiesPanel.setFont({ nodeName: DefaultNodeName.BKM, newFont: "Verdana" });
- expect(await generalProperties.getNodeFont({ nodeName: DefaultNodeName.BKM })).toBe("Verdana");
+ expect(await bkmPropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.BKM })).toBe("Verdana");
});
- test.skip("should change the BKM node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the BKM node shape - background color", async ({ nodes, bkmPropertiesPanel }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeDecisionProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeDecisionProperties.spec.ts
index c2c9b3eee2b..130395cf4fa 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/changeDecisionProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeDecisionProperties.spec.ts
@@ -26,20 +26,21 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - Decision", () => {
- test.beforeEach(async ({ palette, nodes, propertiesPanel }) => {
+ test.beforeEach(async ({ palette, nodes, decisionPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.DECISION });
- await propertiesPanel.open();
+ await decisionPropertiesPanel.open();
});
- test("should change the Decision node name", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeName({ from: DefaultNodeName.DECISION, to: "Renamed Decision" });
+ test("should change the Decision node name", async ({ nodes, decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setName({ from: DefaultNodeName.DECISION, to: "Renamed Decision" });
await expect(nodes.get({ name: "Renamed Decision" })).toBeVisible();
+ expect(await decisionPropertiesPanel.getName({ nodeName: "Renamed Decision" })).toBe("Renamed Decision");
});
- test("should change the Decision node data type", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeDataType({ nodeName: DefaultNodeName.DECISION, newDataType: DataType.Number });
+ test("should change the Decision node data type", async ({ nodes, decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setDataType({ nodeName: DefaultNodeName.DECISION, newDataType: DataType.Number });
await nodes.hover({ name: DefaultNodeName.DECISION });
await expect(nodes.get({ name: DefaultNodeName.DECISION }).getByPlaceholder("Select a data type...")).toHaveValue(
@@ -47,59 +48,59 @@ test.describe("Change Properties - Decision", () => {
);
});
- test("should change the Decision node description", async ({ generalProperties }) => {
- await generalProperties.changeNodeDescription({
+ test("should change the Decision node description", async ({ decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setDescription({
nodeName: DefaultNodeName.DECISION,
newDescription: "New Decision Description",
});
- expect(await generalProperties.getNodeDescription({ nodeName: DefaultNodeName.DECISION })).toBe(
+ expect(await decisionPropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.DECISION })).toBe(
"New Decision Description"
);
});
- test("should change the Decision node question", async ({ decisionProperties }) => {
- await decisionProperties.changeNodeQuestion({
+ test("should change the Decision node question", async ({ decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setQuestion({
nodeName: DefaultNodeName.DECISION,
newQuestion: "New Decision Question",
});
- expect(await decisionProperties.getNodeQuestion({ nodeName: DefaultNodeName.DECISION })).toBe(
+ expect(await decisionPropertiesPanel.getNodeQuestion({ nodeName: DefaultNodeName.DECISION })).toBe(
"New Decision Question"
);
});
- test("should change the Decision node answers", async ({ decisionProperties }) => {
- await decisionProperties.changeNodeAllowedAnswers({
+ test("should change the Decision node answers", async ({ decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setAllowedAnswers({
nodeName: DefaultNodeName.DECISION,
newAllowedAnswers: "New Allowed Answers",
});
- expect(await decisionProperties.getNodeAllowedAnswers({ nodeName: DefaultNodeName.DECISION })).toBe(
+ expect(await decisionPropertiesPanel.getNodeAllowedAnswers({ nodeName: DefaultNodeName.DECISION })).toBe(
"New Allowed Answers"
);
});
- test("should change the Decision node documentation links", async ({ generalProperties }) => {
- await generalProperties.addDocumentationLink({
+ test("should change the Decision node documentation links", async ({ decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.addDocumentationLink({
nodeName: DefaultNodeName.DECISION,
linkText: "Link Text",
linkHref: "http://link.test.com",
});
- const links = await generalProperties.getDocumentationLinks({ nodeName: DefaultNodeName.DECISION });
+ const links = await decisionPropertiesPanel.getDocumentationLinks({ nodeName: DefaultNodeName.DECISION });
expect(links).toHaveLength(1);
expect(links[0]).toHaveText("Link Text");
expect(links[0]).toHaveAttribute("href", "http://link.test.com/");
});
- test("should change the Decision node font - family", async ({ generalProperties }) => {
- await generalProperties.changeNodeFont({ nodeName: DefaultNodeName.DECISION, newFont: "Verdana" });
+ test("should change the Decision node font - family", async ({ decisionPropertiesPanel }) => {
+ await decisionPropertiesPanel.setFont({ nodeName: DefaultNodeName.DECISION, newFont: "Verdana" });
- expect(await generalProperties.getNodeFont({ nodeName: DefaultNodeName.DECISION })).toBe("Verdana");
+ expect(await decisionPropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.DECISION })).toBe("Verdana");
});
- test.skip("should change the Decision node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the Decision node shape - background color", async ({ nodes, decisionPropertiesPanel }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeDecisionServiceProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeDecisionServiceProperties.spec.ts
index 7d9285737b5..aa6b4366021 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/changeDecisionServiceProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeDecisionServiceProperties.spec.ts
@@ -26,23 +26,26 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - Decision Service", () => {
- test.beforeEach(async ({ palette, nodes, containerNodeGeneralProperties }) => {
+ test.beforeEach(async ({ palette, nodes, decisionServicePropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.DECISION_SERVICE, position: NodePosition.TOP });
- await containerNodeGeneralProperties.open();
+ await decisionServicePropertiesPanel.open();
});
- test("should change the Decision Service node name", async ({ nodes, containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeName({
+ test("should change the Decision Service node name", async ({ nodes, decisionServicePropertiesPanel }) => {
+ await decisionServicePropertiesPanel.setName({
from: DefaultNodeName.DECISION_SERVICE,
to: "Renamed Decision Service",
});
await expect(nodes.get({ name: "Renamed Decision Service" })).toBeVisible();
+ expect(await decisionServicePropertiesPanel.getName({ nodeName: "Renamed Decision Service" })).toBe(
+ "Renamed Decision Service"
+ );
});
- test("should change the Decision Service node data type", async ({ nodes, containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeDataType({
+ test("should change the Decision Service node data type", async ({ nodes, decisionServicePropertiesPanel }) => {
+ await decisionServicePropertiesPanel.setDataType({
nodeName: DefaultNodeName.DECISION_SERVICE,
newDataType: DataType.Number,
});
@@ -53,25 +56,25 @@ test.describe("Change Properties - Decision Service", () => {
).toHaveValue(DataType.Number);
});
- test("should change the Decision Service node description", async ({ containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeDescription({
+ test("should change the Decision Service node description", async ({ decisionServicePropertiesPanel }) => {
+ await decisionServicePropertiesPanel.setDescription({
nodeName: DefaultNodeName.DECISION_SERVICE,
newDescription: "New Decision Service Description",
});
expect(
- await containerNodeGeneralProperties.getNodeDescription({ nodeName: DefaultNodeName.DECISION_SERVICE })
+ await decisionServicePropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.DECISION_SERVICE })
).toBe("New Decision Service Description");
});
- test("should change the Decision Service node documentation links", async ({ containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.addDocumentationLink({
+ test("should change the Decision Service node documentation links", async ({ decisionServicePropertiesPanel }) => {
+ await decisionServicePropertiesPanel.addDocumentationLink({
nodeName: DefaultNodeName.DECISION_SERVICE,
linkText: "Link Text",
linkHref: "http://link.test.com",
});
- const links = await containerNodeGeneralProperties.getDocumentationLinks({
+ const links = await decisionServicePropertiesPanel.getDocumentationLinks({
nodeName: DefaultNodeName.DECISION_SERVICE,
});
expect(links).toHaveLength(1);
@@ -79,20 +82,20 @@ test.describe("Change Properties - Decision Service", () => {
expect(links[0]).toHaveAttribute("href", "http://link.test.com/");
});
- test("should change the Decision Service node font - family", async ({ containerNodeGeneralProperties }) => {
- await containerNodeGeneralProperties.changeNodeFont({
+ test("should change the Decision Service node font - family", async ({ decisionServicePropertiesPanel }) => {
+ await decisionServicePropertiesPanel.setFont({
nodeName: DefaultNodeName.DECISION_SERVICE,
newFont: "Verdana",
});
- expect(await containerNodeGeneralProperties.getNodeFont({ nodeName: DefaultNodeName.DECISION_SERVICE })).toBe(
+ expect(await decisionServicePropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.DECISION_SERVICE })).toBe(
"Verdana"
);
});
test.skip("should change the Decision Service node shape - background color", async ({
nodes,
- containerNodeGeneralProperties,
+ decisionServicePropertiesPanel,
}) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeDiagramProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeDiagramProperties.spec.ts
new file mode 100644
index 00000000000..85d73d48f79
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeDiagramProperties.spec.ts
@@ -0,0 +1,38 @@
+/*
+ * 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 { DataType } from "../__fixtures__/jsonModel";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ editor }) => {
+ await editor.open();
+});
+
+test.describe("Change Properties - Diagram", () => {
+ test("should change the Diagram name", async ({ diagramPropertiesPanel }) => {});
+
+ test("should change the Diagram description", async ({ diagramPropertiesPanel }) => {});
+
+ test("should change the Diagram expression language", async ({ diagramPropertiesPanel }) => {});
+
+ test("should change the Diagram ID", async ({ diagramPropertiesPanel }) => {});
+
+ test("should change the Diagram namespace", async ({ diagramPropertiesPanel }) => {});
+});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeInputDataProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeInputDataProperties.spec.ts
index 245e7531e4c..95992ecea7e 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/changeInputDataProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeInputDataProperties.spec.ts
@@ -26,20 +26,21 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Change Properties - Input Data", () => {
- test.beforeEach(async ({ palette, nodes, propertiesPanel }) => {
+ test.beforeEach(async ({ palette, nodes, inputDataPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.INPUT_DATA });
- await propertiesPanel.open();
+ await inputDataPropertiesPanel.open();
});
- test("should change the Input Data node name", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeName({ from: DefaultNodeName.INPUT_DATA, to: "Renamed Input Data" });
+ test("should change the Input Data node name", async ({ nodes, inputDataPropertiesPanel }) => {
+ await inputDataPropertiesPanel.setName({ from: DefaultNodeName.INPUT_DATA, to: "Renamed Input Data" });
await expect(nodes.get({ name: "Renamed Input Data" })).toBeVisible();
+ expect(await inputDataPropertiesPanel.getName({ nodeName: "Renamed Input Data" })).toBe("Renamed Input Data");
});
- test("should change the Input Data node data type", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeDataType({ nodeName: DefaultNodeName.INPUT_DATA, newDataType: DataType.Number });
+ test("should change the Input Data node data type", async ({ nodes, inputDataPropertiesPanel }) => {
+ await inputDataPropertiesPanel.setDataType({ nodeName: DefaultNodeName.INPUT_DATA, newDataType: DataType.Number });
await nodes.hover({ name: DefaultNodeName.INPUT_DATA });
await expect(nodes.get({ name: DefaultNodeName.INPUT_DATA }).getByPlaceholder("Select a data type...")).toHaveValue(
@@ -47,37 +48,40 @@ test.describe("Change Properties - Input Data", () => {
);
});
- test("should change the Input Data node description", async ({ generalProperties }) => {
- await generalProperties.changeNodeDescription({
+ test("should change the Input Data node description", async ({ inputDataPropertiesPanel }) => {
+ await inputDataPropertiesPanel.setDescription({
nodeName: DefaultNodeName.INPUT_DATA,
newDescription: "New Input Data Description",
});
- expect(await generalProperties.getNodeDescription({ nodeName: DefaultNodeName.INPUT_DATA })).toBe(
+ expect(await inputDataPropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.INPUT_DATA })).toBe(
"New Input Data Description"
);
});
- test("should change the Input Data node documentation links", async ({ generalProperties }) => {
- await generalProperties.addDocumentationLink({
+ test("should change the Input Data node documentation links", async ({ inputDataPropertiesPanel }) => {
+ await inputDataPropertiesPanel.addDocumentationLink({
nodeName: DefaultNodeName.INPUT_DATA,
linkText: "Link Text",
linkHref: "http://link.test.com",
});
- const links = await generalProperties.getDocumentationLinks({ nodeName: DefaultNodeName.INPUT_DATA });
+ const links = await inputDataPropertiesPanel.getDocumentationLinks({ nodeName: DefaultNodeName.INPUT_DATA });
expect(links).toHaveLength(1);
expect(links[0]).toHaveText("Link Text");
expect(links[0]).toHaveAttribute("href", "http://link.test.com/");
});
- test("should change the Input Data node font - family", async ({ generalProperties }) => {
- await generalProperties.changeNodeFont({ nodeName: DefaultNodeName.INPUT_DATA, newFont: "Verdana" });
+ test("should change the Input Data node font - family", async ({ inputDataPropertiesPanel }) => {
+ await inputDataPropertiesPanel.setFont({ nodeName: DefaultNodeName.INPUT_DATA, newFont: "Verdana" });
- expect(await generalProperties.getNodeFont({ nodeName: DefaultNodeName.INPUT_DATA })).toBe("Verdana");
+ expect(await inputDataPropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.INPUT_DATA })).toBe("Verdana");
});
- test.skip("should change the Input Data node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the Input Data node shape - background color", async ({
+ nodes,
+ inputDataPropertiesPanel,
+ }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeKnowledgeSourceProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeKnowledgeSourceProperties.spec.ts
index 3a1838b9c26..73b483eb62d 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/changeKnowledgeSourceProperties.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeKnowledgeSourceProperties.spec.ts
@@ -24,72 +24,85 @@ test.beforeEach(async ({ editor }) => {
await editor.open();
});
-test.describe("Change Properties - Knoledge Source", () => {
- test.beforeEach(async ({ palette, nodes, propertiesPanel }) => {
+test.describe("Change Properties - Knowledge Source", () => {
+ test.beforeEach(async ({ palette, nodes, knowledgeSourcePropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.KNOWLEDGE_SOURCE, targetPosition: { x: 100, y: 100 } });
await nodes.select({ name: DefaultNodeName.KNOWLEDGE_SOURCE });
- await propertiesPanel.open();
+ await knowledgeSourcePropertiesPanel.open();
});
- test("should change the Knoledge Source node name", async ({ nodes, generalProperties }) => {
- await generalProperties.changeNodeName({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: "Renamed Knoledge Source" });
+ test("should change the Knowledge Source node name", async ({ nodes, knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.setName({
+ from: DefaultNodeName.KNOWLEDGE_SOURCE,
+ to: "Renamed Knowledge Source",
+ });
- await expect(nodes.get({ name: "Renamed Knoledge Source" })).toBeVisible();
+ await expect(nodes.get({ name: "Renamed Knowledge Source" })).toBeVisible();
+ expect(await knowledgeSourcePropertiesPanel.getName({ nodeName: "Renamed Knowledge Source" })).toBe(
+ "Renamed Knowledge Source"
+ );
});
- test("should change the Knoledge Source node description", async ({ generalProperties }) => {
- await generalProperties.changeNodeDescription({
+ test("should change the Knowledge Source node description", async ({ knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.setDescription({
nodeName: DefaultNodeName.KNOWLEDGE_SOURCE,
- newDescription: "New Knoledge Source Description",
+ newDescription: "New Knowledge Source Description",
});
- expect(await generalProperties.getNodeDescription({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe(
- "New Knoledge Source Description"
- );
+ expect(
+ await knowledgeSourcePropertiesPanel.getNodeDescription({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBe("New Knowledge Source Description");
});
- test("should change the Knoledge Source node Source Type", async ({ knowledgeSourceProperties }) => {
- await knowledgeSourceProperties.changeNodeSourceType({
+ test("should change the Knowledge Source node Source Type", async ({ knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.setSourceType({
nodeName: DefaultNodeName.KNOWLEDGE_SOURCE,
- newSourceType: "New Knoledge Source Source Type",
+ newSourceType: "New Knowledge Source Source Type",
});
- expect(await knowledgeSourceProperties.getNodeSourceType({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe(
- "New Knoledge Source Source Type"
+ expect(await knowledgeSourcePropertiesPanel.getNodeSourceType({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe(
+ "New Knowledge Source Source Type"
);
});
- test("should change the Knoledge Source node Location URI", async ({ knowledgeSourceProperties }) => {
- await knowledgeSourceProperties.changeNodeLocationURI({
+ test("should change the Knowledge Source node Location URI", async ({ knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.setLocationURI({
nodeName: DefaultNodeName.KNOWLEDGE_SOURCE,
newLocationURI: "New Location URI",
});
- expect(await knowledgeSourceProperties.getNodeLocationURI({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe(
- "New Location URI"
- );
+ expect(
+ await knowledgeSourcePropertiesPanel.getNodeLocationURI({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBe("New Location URI");
});
- test("should change the Knoledge Source node documentation links", async ({ generalProperties }) => {
- await generalProperties.addDocumentationLink({
+ test("should change the Knowledge Source node documentation links", async ({ knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.addDocumentationLink({
nodeName: DefaultNodeName.KNOWLEDGE_SOURCE,
linkText: "Link Text",
linkHref: "http://link.test.com",
});
- const links = await generalProperties.getDocumentationLinks({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE });
+ const links = await knowledgeSourcePropertiesPanel.getDocumentationLinks({
+ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE,
+ });
expect(links).toHaveLength(1);
expect(links[0]).toHaveText("Link Text");
expect(links[0]).toHaveAttribute("href", "http://link.test.com/");
});
- test("should change the Knoledge Source node font - family", async ({ generalProperties }) => {
- await generalProperties.changeNodeFont({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE, newFont: "Verdana" });
+ test("should change the Knowledge Source node font - family", async ({ knowledgeSourcePropertiesPanel }) => {
+ await knowledgeSourcePropertiesPanel.setFont({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE, newFont: "Verdana" });
- expect(await generalProperties.getNodeFont({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe("Verdana");
+ expect(await knowledgeSourcePropertiesPanel.getNodeFont({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).toBe(
+ "Verdana"
+ );
});
- test.skip("should change the Knoledge Source node shape - background color", async ({ nodes, propertiesPanel }) => {
+ test.skip("should change the Knowledge Source node shape - background color", async ({
+ nodes,
+ knowledgeSourcePropertiesPanel,
+ }) => {
// blocked https://github.com/microsoft/playwright/issues/19929#issuecomment-1377035969
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/changeMultipleNodesProperties.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/changeMultipleNodesProperties.spec.ts
new file mode 100644
index 00000000000..42052d080ee
--- /dev/null
+++ b/packages/dmn-editor/tests/e2e/drgElements/changeMultipleNodesProperties.spec.ts
@@ -0,0 +1,30 @@
+/*
+ * 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 { DataType } from "../__fixtures__/jsonModel";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ editor }) => {
+ await editor.open();
+});
+
+test.describe("Change Properties - Multiple Nodes", () => {
+ test("should change multiple nodes font", async ({ nodes, multipleNodesPropertiesPanel }) => {});
+});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/resizeBKM.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/resizeBkm.spec.ts
similarity index 77%
rename from packages/dmn-editor/tests/e2e/drgElements/resizeBKM.spec.ts
rename to packages/dmn-editor/tests/e2e/drgElements/resizeBkm.spec.ts
index e0b979c16c9..fdf7f3f1bd2 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/resizeBKM.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/resizeBkm.spec.ts
@@ -25,13 +25,13 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - BKM", () => {
- test("should resize BKM node", async ({ palette, nodes, generalProperties }) => {
+ test("should resize BKM node", async ({ palette, nodes, bkmPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.BKM, targetPosition: { x: 100, y: 100 } });
await nodes.resize({ nodeName: DefaultNodeName.BKM, xOffset: 50, yOffset: 50 });
- await generalProperties.open();
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.BKM })).width).toEqual("200");
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.BKM })).height).toEqual("120");
+ await bkmPropertiesPanel.open();
+ await expect((await bkmPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.BKM })).width).toEqual("200");
+ await expect((await bkmPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.BKM })).height).toEqual("120");
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/resizeDecision.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/resizeDecision.spec.ts
index e5bda85da2b..2dcc56ae1ec 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/resizeDecision.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/resizeDecision.spec.ts
@@ -25,13 +25,17 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Decision", () => {
- test("should resize Decision node", async ({ palette, nodes, generalProperties }) => {
+ test("should resize Decision node", async ({ palette, nodes, decisionPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 100, y: 100 } });
await nodes.resize({ nodeName: DefaultNodeName.DECISION, xOffset: 50, yOffset: 50 });
- await generalProperties.open();
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.DECISION })).width).toEqual("200");
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.DECISION })).height).toEqual("120");
+ await decisionPropertiesPanel.open();
+ await expect((await decisionPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.DECISION })).width).toEqual(
+ "200"
+ );
+ await expect((await decisionPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.DECISION })).height).toEqual(
+ "120"
+ );
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/resizeDecisionService.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/resizeDecisionService.spec.ts
index 3e59dbcb6fb..591bcb62ffa 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/resizeDecisionService.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/resizeDecisionService.spec.ts
@@ -25,7 +25,7 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Decision Service", () => {
- test("should resize Decision Service node", async ({ palette, nodes, containerNodeGeneralProperties }) => {
+ test("should resize Decision Service node", async ({ palette, nodes, decisionServicePropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 100, y: 100 } });
await nodes.resize({
@@ -35,15 +35,15 @@ test.describe("Resize node - Decision Service", () => {
yOffset: 50,
});
- await containerNodeGeneralProperties.open();
+ await decisionServicePropertiesPanel.open();
await expect(
(
- await containerNodeGeneralProperties.getNodeShape({ nodeName: DefaultNodeName.DECISION_SERVICE })
+ await decisionServicePropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.DECISION_SERVICE })
).width
).toEqual("360");
await expect(
(
- await containerNodeGeneralProperties.getNodeShape({ nodeName: DefaultNodeName.DECISION_SERVICE })
+ await decisionServicePropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.DECISION_SERVICE })
).height
).toEqual("360");
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/resizeInputData.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/resizeInputData.spec.ts
index 20554a14061..a483cf7b142 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/resizeInputData.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/resizeInputData.spec.ts
@@ -25,15 +25,19 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Input Data", () => {
- test("should resize Input Data node", async ({ palette, nodes, generalProperties }) => {
+ test("should resize Input Data node", async ({ palette, nodes, inputDataPropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { x: 100, y: 100 } });
await nodes.resize({ nodeName: DefaultNodeName.INPUT_DATA, xOffset: 50, yOffset: 50 });
- await generalProperties.open();
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.INPUT_DATA })).width).toEqual("200");
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.INPUT_DATA })).height).toEqual(
- "120"
+ await inputDataPropertiesPanel.open();
+ await expect((await inputDataPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.INPUT_DATA })).width).toEqual(
+ "200"
);
+ await expect(
+ (
+ await inputDataPropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.INPUT_DATA })
+ ).height
+ ).toEqual("120");
});
});
diff --git a/packages/dmn-editor/tests/e2e/drgElements/resizeKnowledgeSource.spec.ts b/packages/dmn-editor/tests/e2e/drgElements/resizeKnowledgeSource.spec.ts
index 3b6b8fdce6b..679c741bc2b 100644
--- a/packages/dmn-editor/tests/e2e/drgElements/resizeKnowledgeSource.spec.ts
+++ b/packages/dmn-editor/tests/e2e/drgElements/resizeKnowledgeSource.spec.ts
@@ -25,17 +25,21 @@ test.beforeEach(async ({ editor }) => {
});
test.describe("Resize node - Knowledge Source", () => {
- test("should resize Knowledge Source node", async ({ palette, nodes, generalProperties }) => {
+ test("should resize Knowledge Source node", async ({ palette, nodes, knowledgeSourcePropertiesPanel }) => {
await palette.dragNewNode({ type: NodeType.KNOWLEDGE_SOURCE, targetPosition: { x: 100, y: 100 } });
await nodes.resize({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE, xOffset: 50, yOffset: 50 });
- await generalProperties.open();
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).width).toEqual(
- "200"
- );
- await expect((await generalProperties.getNodeShape({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })).height).toEqual(
- "120"
- );
+ await knowledgeSourcePropertiesPanel.open();
+ await expect(
+ (
+ await knowledgeSourcePropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).width
+ ).toEqual("200");
+ await expect(
+ (
+ await knowledgeSourcePropertiesPanel.getNodeShape({ nodeName: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).height
+ ).toEqual("120");
});
});