rajalakshmys-27 commented on code in PR #3556:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3556#discussion_r3215059121


##########
packages/bpmn-editor/tests-e2e/__fixtures__/propertiesPanel/endEventPropertiesPanel.ts:
##########
@@ -0,0 +1,194 @@
+/*
+ * 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 { Page, Locator } from "@playwright/test";
+import { PropertiesPanelBase } from "./propertiesPanelBase";
+import { Diagram } from "../diagram";
+import { Nodes } from "../nodes";
+import { NameProperties } from "./parts/nameProperties";
+import { DocumentationProperties } from "./parts/documentationProperties";
+
+export class EndEventPropertiesPanel extends PropertiesPanelBase {
+  private nameProperties: NameProperties;
+  private documentationProperties: DocumentationProperties;
+
+  constructor(
+    public diagram: Diagram,
+    public page: Page,
+    public nodes: Nodes
+  ) {
+    super(diagram, page);
+    this.nameProperties = new NameProperties(this.panel(), page);
+    this.documentationProperties = new DocumentationProperties(this.panel(), 
page);
+  }
+
+  private async morphToEventType(args: { endEventLocator: Locator; eventType: 
string }) {
+    await this.nodes.morphNode({
+      nodeLocator: args.endEventLocator,
+      targetMorphType: args.eventType,
+    });
+  }
+
+  public async setName(args: { newName: string }) {
+    await this.nameProperties.setName({ ...args });
+  }
+
+  public async getName(): Promise<string> {
+    return await this.nameProperties.getName();
+  }
+
+  public async setDocumentation(args: { newDocumentation: string }) {
+    await this.documentationProperties.setDocumentation({ ...args });
+  }
+
+  public async getDocumentation(): Promise<string> {
+    return await this.documentationProperties.getDocumentation();
+  }
+
+  public async setTerminateDefinition(args: { endEventLocator: Locator }) {
+    await this.morphToEventType({ endEventLocator: args.endEventLocator, 
eventType: "Terminate" });
+  }
+
+  public async setMessageDefinition(args: { messageName: string; 
endEventLocator: Locator }) {
+    await this.morphToEventType({ endEventLocator: args.endEventLocator, 
eventType: "Message" });
+
+    const messageInput = 
this.panel().locator('input[role="combobox"]').first();
+    await messageInput.waitFor({ state: "visible", timeout: 10000 });
+    await messageInput.click();

Review Comment:
   thanks



-- 
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]

Reply via email to