This is an automated email from the ASF dual-hosted git repository.

porcelli pushed a commit to branch KOGITO-7648
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-tools-temporary-rnd-do-not-use.git

commit 82dc619a6b71d52e08a4217bb408e3bcd98ce95e
Author: Dominik Hanak <[email protected]>
AuthorDate: Mon Aug 15 14:30:18 2022 +0200

    KOGITO-7648: Split vscode-extension-pack it-tests
    
    Split the suite into two, establishes smoke tests &
    integration tests.
---
 .../it-tests/extension-editors-smoke.test.ts       | 117 +++++++++++++++++++++
 .../it-tests/extension-editors.test.ts             |  79 +-------------
 2 files changed, 121 insertions(+), 75 deletions(-)

diff --git 
a/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors-smoke.test.ts
 
b/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors-smoke.test.ts
new file mode 100644
index 0000000000..f7c76dd05d
--- /dev/null
+++ 
b/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors-smoke.test.ts
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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 { SideBarView, WebView } from "vscode-extension-tester";
+import * as path from "path";
+import { assertWebElementIsDisplayedEnabled } from "./helpers/CommonAsserts";
+import VSCodeTestHelper from "./helpers/VSCodeTestHelper";
+import BpmnEditorTestHelper, { PaletteCategories } from 
"./helpers/bpmn/BpmnEditorTestHelper";
+import ScesimEditorTestHelper from "./helpers/ScesimEditorTestHelper";
+import DmnEditorTestHelper from "./helpers/dmn/DmnEditorTestHelper";
+import PmmlEditorTestHelper from "./helpers/PmmlEditorTestHelper";
+
+describe("KIE Editors - Integration Smoke Test Suite", () => {
+  const RESOURCES: string = path.resolve("it-tests-tmp", "resources");
+  const DEMO_BPMN: string = "demo.bpmn";
+  const DEMO_DMN: string = "demo.dmn";
+  const DEMO_SCESIM: string = "demo.scesim";
+  const DEMO_PMML: string = "demo.pmml";
+
+  let testHelper: VSCodeTestHelper;
+  let webview: WebView;
+  let folderView: SideBarView;
+
+  before(async function () {
+    this.timeout(60000);
+    testHelper = new VSCodeTestHelper();
+    folderView = await testHelper.openFolder(RESOURCES);
+  });
+
+  beforeEach(async function () {
+    await testHelper.closeAllEditors();
+    await testHelper.closeAllNotifications();
+  });
+
+  afterEach(async function () {
+    this.timeout(15000);
+    await testHelper.closeAllEditors();
+    await testHelper.closeAllNotifications();
+    await webview.switchBack();
+  });
+
+  it("Opens demo.bpmn file in BPMN Editor and loads correct diagram", async 
function () {
+    this.timeout(20000);
+    webview = await testHelper.openFileFromSidebar(DEMO_BPMN);
+    await testHelper.switchWebviewToFrame(webview);
+    const bpmnEditorTester = new BpmnEditorTestHelper(webview);
+
+    const palette = await bpmnEditorTester.getPalette();
+    await assertWebElementIsDisplayedEnabled(palette);
+
+    await bpmnEditorTester.openDiagramProperties();
+
+    const explorer = await bpmnEditorTester.openDiagramExplorer();
+    await explorer.assertDiagramNodeIsPresent("Start");
+    await explorer.assertDiagramNodeIsPresent("End");
+
+    await webview.switchBack();
+  });
+
+  it("Opens demo.dmn file in DMN Editor", async function () {
+    this.timeout(20000);
+    webview = await testHelper.openFileFromSidebar(DEMO_DMN);
+    await testHelper.switchWebviewToFrame(webview);
+    const dmnEditorTester = new DmnEditorTestHelper(webview);
+
+    await dmnEditorTester.openDiagramProperties();
+    await dmnEditorTester.openDiagramExplorer();
+    await dmnEditorTester.openDecisionNavigator();
+
+    await webview.switchBack();
+  });
+
+  it("Opens demo.scesim file in SCESIM Editor", async function () {
+    this.timeout(20000);
+
+    webview = await testHelper.openFileFromSidebar(DEMO_SCESIM);
+    await testHelper.switchWebviewToFrame(webview);
+    const scesimEditorTester = new ScesimEditorTestHelper(webview);
+
+    await scesimEditorTester.openScenarioCheatsheet();
+    await scesimEditorTester.openSettings();
+    await scesimEditorTester.openTestTools();
+
+    await webview.switchBack();
+  });
+
+  it("Opens demo.pmml file in PMML Editor", async function () {
+    this.timeout(20000);
+    webview = await testHelper.openFileFromSidebar(DEMO_PMML);
+    await testHelper.switchWebviewToFrame(webview);
+    const pmmlEditorTester = new PmmlEditorTestHelper(webview);
+
+    const dataDictionaryModel = await pmmlEditorTester.openDataDictionary();
+    dataDictionaryModel.close();
+
+    const miningSchemaModel = await pmmlEditorTester.openMiningSchema();
+    miningSchemaModel.close();
+
+    const outputsModal = await pmmlEditorTester.openOutputs();
+    outputsModal.close();
+
+    await webview.switchBack();
+  });
+});
diff --git 
a/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors.test.ts
 
b/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors.test.ts
index 67341c6239..dcae444425 100644
--- 
a/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors.test.ts
+++ 
b/packages/vscode-extension-pack-kogito-kie-editors/it-tests/extension-editors.test.ts
@@ -14,16 +14,15 @@
  * limitations under the License.
  */
 
-import { By, EditorView, InputBox, SideBarView, TextEditor, WebView } from 
"vscode-extension-tester";
+import { By, InputBox, SideBarView, TextEditor, WebView } from 
"vscode-extension-tester";
 import * as path from "path";
-import { h5ComponentWithText, labeledAnyElementInPropertiesPanel } from 
"./helpers/CommonLocators";
+import { h5ComponentWithText } from "./helpers/CommonLocators";
 import { EditorTabs } from "./helpers/dmn/EditorTabs";
 import { assertWebElementIsDisplayedEnabled } from "./helpers/CommonAsserts";
 import VSCodeTestHelper from "./helpers/VSCodeTestHelper";
 import BpmnEditorTestHelper, { PaletteCategories } from 
"./helpers/bpmn/BpmnEditorTestHelper";
 import ScesimEditorTestHelper from "./helpers/ScesimEditorTestHelper";
 import DmnEditorTestHelper from "./helpers/dmn/DmnEditorTestHelper";
-import PmmlEditorTestHelper from "./helpers/PmmlEditorTestHelper";
 import { assert } from "chai";
 import {
   palletteItemAnchor,
@@ -32,22 +31,16 @@ import {
 } from "./helpers/bpmn/BpmnLocators";
 import DecisionNavigatorHelper from "./helpers/dmn/DecisionNavigatorHelper";
 import { PropertiesPanelSection } from "./helpers/bpmn/PropertiesPanelHelper";
-import { TextEdit } from "vscode";
 import Correlation from "./helpers/bpmn/Correlation";
-import ProcessVariablesWidgetHelper from 
"./helpers/bpmn/ProcessVariablesWidgetHelper";
 import ImplementationExecutionHelper from 
"./helpers/bpmn/ImplementationExecutionHelper";
 
-describe("Editors are loading properly", () => {
+describe("KIE Editors Integration Test Suite", () => {
   const RESOURCES: string = path.resolve("it-tests-tmp", "resources");
-  const DEMO_BPMN: string = "demo.bpmn";
   const DEMO_DMN: string = "demo.dmn";
   const DEMO_DMN_SCESIM: string = "demo-dmn.scesim";
   const DEMO_EXPRESSION_DMN: string = "demo-expression.dmn";
-  const DEMO_SCESIM: string = "demo.scesim";
-  const DEMO_PMML: string = "demo.pmml";
   const MULTIPLE_INSTANCE_BPMN: string = "MultipleInstanceSubprocess.bpmn";
   const USER_TASK_BPMN: string = "UserTask.bpmn";
-
   const REUSABLE_DMN: string = "reusable-model.dmn";
   const WID_BPMN: string = "process-wid.bpmn";
 
@@ -73,37 +66,6 @@ describe("Editors are loading properly", () => {
     await webview.switchBack();
   });
 
-  it("Opens demo.bpmn file in BPMN Editor and loads correct diagram", async 
function () {
-    this.timeout(20000);
-    webview = await testHelper.openFileFromSidebar(DEMO_BPMN);
-    await testHelper.switchWebviewToFrame(webview);
-    const bpmnEditorTester = new BpmnEditorTestHelper(webview);
-
-    const palette = await bpmnEditorTester.getPalette();
-    await assertWebElementIsDisplayedEnabled(palette);
-
-    await bpmnEditorTester.openDiagramProperties();
-
-    const explorer = await bpmnEditorTester.openDiagramExplorer();
-    await explorer.assertDiagramNodeIsPresent("Start");
-    await explorer.assertDiagramNodeIsPresent("End");
-
-    await webview.switchBack();
-  });
-
-  it("Opens demo.dmn file in DMN Editor", async function () {
-    this.timeout(20000);
-    webview = await testHelper.openFileFromSidebar(DEMO_DMN);
-    await testHelper.switchWebviewToFrame(webview);
-    const dmnEditorTester = new DmnEditorTestHelper(webview);
-
-    await dmnEditorTester.openDiagramProperties();
-    await dmnEditorTester.openDiagramExplorer();
-    await dmnEditorTester.openDecisionNavigator();
-
-    await webview.switchBack();
-  });
-
   it("Include reusable-model in DMN Editor", async function () {
     this.timeout(20000);
     webview = await testHelper.openFileFromSidebar(DEMO_DMN);
@@ -177,24 +139,9 @@ describe("Editors are loading properly", () => {
     await webview.switchBack();
   });
 
-  it("Opens demo.scesim file in SCESIM Editor", async function () {
-    this.timeout(20000);
-
-    webview = await testHelper.openFileFromSidebar(DEMO_SCESIM);
-    await testHelper.switchWebviewToFrame(webview);
-    const scesimEditorTester = new ScesimEditorTestHelper(webview);
-
-    await scesimEditorTester.openScenarioCheatsheet();
-    await scesimEditorTester.openSettings();
-    await scesimEditorTester.openTestTools();
-
-    await webview.switchBack();
-  });
-
   /**
    * As the opened sceism file is empty, a prompt to specify file under test 
should be shown
    */
-
   it("Opens demo-dmn.scesim file in SCESIM Editor", async function () {
     this.timeout(20000);
 
@@ -220,24 +167,6 @@ describe("Editors are loading properly", () => {
     assert.notEqual(await plainText.getTextAtLine(2), xmlProlog, "<?xml?> 
prolog should be there just once");
   });
 
-  it("Opens demo.pmml file in PMML Editor", async function () {
-    this.timeout(20000);
-    webview = await testHelper.openFileFromSidebar(DEMO_PMML);
-    await testHelper.switchWebviewToFrame(webview);
-    const pmmlEditorTester = new PmmlEditorTestHelper(webview);
-
-    const dataDictionaryModel = await pmmlEditorTester.openDataDictionary();
-    dataDictionaryModel.close();
-
-    const miningSchemaModel = await pmmlEditorTester.openMiningSchema();
-    miningSchemaModel.close();
-
-    const outputsModal = await pmmlEditorTester.openOutputs();
-    outputsModal.close();
-
-    await webview.switchBack();
-  });
-
   it("Opens process with work item definition properly", async function () {
     this.timeout(20000);
     webview = await testHelper.openFileFromSidebar(WID_BPMN, 
"src/main/java/org/kie/businessapp");
@@ -412,7 +341,7 @@ describe("Editors are loading properly", () => {
     await webview.switchBack();
   });
 
-  it.skip("Opens UserTask.bpmn file in BPMN Editor and test On Entry and On 
Exit actions", async function () {
+  it("Opens UserTask.bpmn file in BPMN Editor and test On Entry and On Exit 
actions", async function () {
     this.timeout(20000);
     webview = await testHelper.openFileFromSidebar(USER_TASK_BPMN);
     await testHelper.switchWebviewToFrame(webview);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to