You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/08/01 16:10:37 UTC

[incubator-streampipes] branch STREAMPIPES-545 updated (59129d3cd -> 94d97443e)

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

zehnder pushed a change to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


    from 59129d3cd [STREAMPIPES-565] Add import feature to configuration
     new 71cf84317 [hotfix] Added cypress webpack preprocessor dependency
     new 4bb2d2c7a [hotfix] Fix connect schema rule test
     new fe05a0343 [hotfix] Fix dashboard cypress test
     new 0db857b43 [hotfix] Fix cypress test datalake configuration
     new 94d97443e [hotfix] Fix test widget data configuration

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../fixtures/connect/schemaRules/expected.csv       |  2 +-
 ui/cypress/fixtures/datalake/sample.csv             | 20 ++++++++++----------
 ui/cypress/support/utils/ConnectEventSchemaUtils.ts |  2 +-
 ui/cypress/support/utils/ConnectUtils.ts            | 21 +++++++++++++--------
 ui/cypress/support/utils/DataLakeUtils.ts           |  2 +-
 ui/cypress/support/utils/PipelineUtils.ts           |  8 +++++---
 .../tests/dashboard/dashboardTest.smoke.spec.ts     | 20 ++------------------
 .../datalake/widgetDataConfiguration.smoke.spec.ts  |  3 +++
 ui/package.json                                     |  3 ++-
 .../existing-adapters.component.html                |  2 +-
 .../delete-adapter-dialog.component.html            |  2 +-
 .../add-visualization-dialog.component.html         |  2 +-
 .../pipeline-overview.component.html                |  2 +-
 13 files changed, 42 insertions(+), 47 deletions(-)


[incubator-streampipes] 03/05: [hotfix] Fix dashboard cypress test

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit fe05a0343116556481ebc921762e40a65ee3dc43
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Aug 1 16:47:58 2022 +0200

    [hotfix] Fix dashboard cypress test
---
 ui/cypress/support/utils/ConnectUtils.ts             | 14 ++++++++++----
 .../tests/dashboard/dashboardTest.smoke.spec.ts      | 20 ++------------------
 .../add-visualization-dialog.component.html          |  2 +-
 3 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/ui/cypress/support/utils/ConnectUtils.ts b/ui/cypress/support/utils/ConnectUtils.ts
index f2a39dfd7..8589ce597 100644
--- a/ui/cypress/support/utils/ConnectUtils.ts
+++ b/ui/cypress/support/utils/ConnectUtils.ts
@@ -94,13 +94,19 @@ export class ConnectUtils {
     ConnectEventSchemaUtils.finishEventSchemaConfiguration();
   }
 
-  public static addMachineDataSimulator(name: string) {
+  public static addMachineDataSimulator(name: string, persist: boolean = false) {
 
-    const configuration = SpecificAdapterBuilder
+    const builder = SpecificAdapterBuilder
       .create('Machine_Data_Simulator')
       .setName(name)
-      .addInput('input', 'wait-time-ms', '1000')
-      .build();
+      .addInput('input', 'wait-time-ms', '1000');
+
+    if (persist) {
+      builder.setTimestampProperty('timestamp').
+                setStoreInDataLake();
+    }
+
+    const configuration = builder.build();
 
     ConnectUtils.goToConnect();
 
diff --git a/ui/cypress/tests/dashboard/dashboardTest.smoke.spec.ts b/ui/cypress/tests/dashboard/dashboardTest.smoke.spec.ts
index dd8eabf48..be6ad80a0 100644
--- a/ui/cypress/tests/dashboard/dashboardTest.smoke.spec.ts
+++ b/ui/cypress/tests/dashboard/dashboardTest.smoke.spec.ts
@@ -17,31 +17,15 @@
  */
 
 import { ConnectUtils } from '../../support/utils/ConnectUtils';
-import { PipelineUtils } from '../../support/utils/PipelineUtils';
-import { PipelineElementBuilder } from '../../support/builder/PipelineElementBuilder';
-import { PipelineBuilder } from '../../support/builder/PipelineBuilder';
 import { DashboardUtils } from '../../support/utils/DashboardUtils';
 
-const adapterName = 'simulator';
-
-
 describe('Test live dashboard', () => {
   beforeEach('Setup Test', () => {
     cy.initStreamPipesTest();
-    ConnectUtils.addMachineDataSimulator(adapterName);
+    ConnectUtils.addMachineDataSimulator('simulator', true);
   });
 
   it('Perform Test', () => {
-    const pipelineName = 'DashboardPipeline';
-    const pipelineInput = PipelineBuilder.create(pipelineName)
-      .addSource(adapterName)
-      .addSink(
-        PipelineElementBuilder.create('data_lake')
-          .addInput('input', 'db_measurement', 'demo')
-          .build())
-      .build();
-
-    PipelineUtils.testPipeline(pipelineInput);
 
     DashboardUtils.goToDashboard();
 
@@ -49,7 +33,7 @@ describe('Test live dashboard', () => {
     const dashboardName = 'testDashboard';
     DashboardUtils.addAndEditDashboard(dashboardName);
 
-    DashboardUtils.addWidget(pipelineName, 'raw');
+    DashboardUtils.addWidget('Persist_simulator', 'raw');
 
     // Validate that data is coming (at least 3 events)
     DashboardUtils.validateRawWidgetEvents(3);
diff --git a/ui/src/app/dashboard/dialogs/add-widget/add-visualization-dialog.component.html b/ui/src/app/dashboard/dialogs/add-widget/add-visualization-dialog.component.html
index 45c650a29..5142e8c6c 100644
--- a/ui/src/app/dashboard/dialogs/add-widget/add-visualization-dialog.component.html
+++ b/ui/src/app/dashboard/dialogs/add-widget/add-visualization-dialog.component.html
@@ -26,7 +26,7 @@
                         <mat-list-item *ngFor="let pipeline of visualizablePipelines"
                                        (click)="selectPipeline(pipeline)"
                                        class="list-item"
-                                        [attr.data-cy]="'dashboard-visualize-pipeline-' + pipeline.pipelineName">
+                                        [attr.data-cy]="'dashboard-visualize-pipeline-' + pipeline.pipelineName.replaceAll(' ', '_')">
                             <div mat-list-avatar
                                  class="pipeline-avatar sp-accent-bg">{{iconText(pipeline.measureName)}}
                             </div>


[incubator-streampipes] 01/05: [hotfix] Added cypress webpack preprocessor dependency

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 71cf8431780577f3575fd72d6678ac8dac8456a6
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Aug 1 16:19:01 2022 +0200

    [hotfix] Added cypress webpack preprocessor dependency
---
 ui/package.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/package.json b/ui/package.json
index a9a973cba..30e2878f0 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -96,7 +96,8 @@
     "@angular-devkit/build-angular": "^13.3.0",
     "@angular/cli": "^13.3.0",
     "@angular/compiler-cli": "^13.3.0",
-    "@cypress/webpack-batteries-included-preprocessor": "^2.2.3",
+    "@cypress/webpack-batteries-included-preprocessor": "2.2.3",
+    "@cypress/webpack-preprocessor": "5.12.0",
     "@ngtools/webpack": "^13.3.0",
     "@types/angular": "^1.7.4",
     "@types/jasmine": "~3.6.0",


[incubator-streampipes] 04/05: [hotfix] Fix cypress test datalake configuration

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 0db857b438038ee5e6cd9f300ce15646c2119e20
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Aug 1 17:08:06 2022 +0200

    [hotfix] Fix cypress test datalake configuration
---
 .../support/utils/ConnectEventSchemaUtils.ts       |  2 +-
 ui/cypress/support/utils/ConnectUtils.ts           |  7 ++--
 ui/cypress/support/utils/PipelineUtils.ts          |  8 ++--
 .../tests/datalake/configuration.smoke.spec.ts     | 48 +++++++++++-----------
 .../existing-adapters.component.html               |  2 +-
 .../delete-adapter-dialog.component.html           |  2 +-
 .../pipeline-overview.component.html               |  2 +-
 7 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/ui/cypress/support/utils/ConnectEventSchemaUtils.ts b/ui/cypress/support/utils/ConnectEventSchemaUtils.ts
index ba9405be0..a9044a66f 100644
--- a/ui/cypress/support/utils/ConnectEventSchemaUtils.ts
+++ b/ui/cypress/support/utils/ConnectEventSchemaUtils.ts
@@ -19,7 +19,7 @@
 export class ConnectEventSchemaUtils {
 
   public static markPropertyAsDimension(propertyName: string) {
-    cy.dataCy('property-scope-' + propertyName)
+    cy.dataCy('property-scope-' + propertyName, { timeout: 10000 })
       .click()
       .get('.mat-option-text')
       .contains('Dimension')
diff --git a/ui/cypress/support/utils/ConnectUtils.ts b/ui/cypress/support/utils/ConnectUtils.ts
index 8589ce597..8a517ec04 100644
--- a/ui/cypress/support/utils/ConnectUtils.ts
+++ b/ui/cypress/support/utils/ConnectUtils.ts
@@ -201,12 +201,11 @@ export class ConnectUtils {
     // Delete adapter
     cy.visit('#/connect');
 
-    cy.dataCy('delete').should('have.length', 1);
-    cy.dataCy('delete').click();
+    cy.dataCy('delete-adapter').should('have.length', 1);
     cy.dataCy('delete-adapter').click();
+    cy.dataCy('delete-adapter-confirmation').click();
     cy.dataCy('adapter-deletion-in-progress', { timeout: 10000 }).should('be.visible');
-    cy.dataCy('delete', { timeout: 20000 }).should('have.length', 0);
-    // });
+    cy.dataCy('delete-adapter', { timeout: 20000 }).should('have.length', 0);
   }
 
   public static setUpPreprocessingRuleTest(): AdapterInput {
diff --git a/ui/cypress/support/utils/PipelineUtils.ts b/ui/cypress/support/utils/PipelineUtils.ts
index 89e34d582..2ef1fdcf4 100644
--- a/ui/cypress/support/utils/PipelineUtils.ts
+++ b/ui/cypress/support/utils/PipelineUtils.ts
@@ -105,9 +105,11 @@ export class PipelineUtils {
   public static deletePipeline() {
     // Delete pipeline
     cy.visit('#/pipelines');
-    cy.dataCy('delete').should('have.length', 1);
-    cy.dataCy('delete').click({ force: true });
+    cy.dataCy('delete-pipeline').should('have.length', 1);
+    cy.dataCy('delete-pipeline').click({ force: true });
+
     cy.dataCy('sp-pipeline-stop-and-delete').click();
-    cy.dataCy('delete', { timeout: 10000 }).should('have.length', 0);
+
+    cy.dataCy('delete-pipeline', { timeout: 10000 }).should('have.length', 0);
   }
 }
diff --git a/ui/cypress/tests/datalake/configuration.smoke.spec.ts b/ui/cypress/tests/datalake/configuration.smoke.spec.ts
index 58170acae..0da18a504 100644
--- a/ui/cypress/tests/datalake/configuration.smoke.spec.ts
+++ b/ui/cypress/tests/datalake/configuration.smoke.spec.ts
@@ -20,38 +20,38 @@ import { PipelineUtils } from '../../support/utils/PipelineUtils';
 import { DataLakeUtils } from '../../support/utils/DataLakeUtils';
 
 
-describe('Test Truncate data in datalake', () => {
+// describe('Test Truncate data in datalake', () => {
 
-  beforeEach('Setup Test', () => {
-    cy.initStreamPipesTest();
-    DataLakeUtils.loadRandomDataSetIntoDataLake();
-  });
+//   beforeEach('Setup Test', () => {
+//     cy.initStreamPipesTest();
+//     DataLakeUtils.loadRandomDataSetIntoDataLake();
+//   });
 
-  it('Perform Test', () => {
+//   it('Perform Test', () => {
 
-    DataLakeUtils.goToDatalakeConfiguration();
+//     DataLakeUtils.goToDatalakeConfiguration();
 
-    // Check if amount of events is correct
-    cy.dataCy('datalake-number-of-events', { timeout: 10000 })
-      .should('be.visible')
-      .contains('10');
+//     // Check if amount of events is correct
+//     cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+//       .should('be.visible')
+//       .contains('10');
 
-    // Truncate data
-    cy.dataCy('datalake-truncate-btn')
-      .should('be.visible')
-      .click();
-    cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
-      .should('be.visible')
-      .click();
+//     // Truncate data
+//     cy.dataCy('datalake-truncate-btn')
+//       .should('be.visible')
+//       .click();
+//     cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
+//       .should('be.visible')
+//       .click();
 
-    // Check if amount of events is zero
-    cy.dataCy('datalake-number-of-events', { timeout: 10000 })
-      .should('be.visible')
-      .contains('0');
+//     // Check if amount of events is zero
+//     cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+//       .should('be.visible')
+//       .contains('0');
 
-  });
+//   });
 
-});
+// });
 
 describe('Delete data in datalake', () => {
 
diff --git a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
index 1eb64195b..102666f32 100644
--- a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
+++ b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
@@ -125,7 +125,7 @@
                 </span>
                                         <span fxFlex fxFlexOrder="3" fxLayout="row" fxLayoutAlign="center center">
                     <button color="accent" mat-button mat-icon-button matTooltip="Delete adapter"
-                            data-cy="delete" matTooltipPosition="above" (click)="deleteAdapter(adapter)">
+                            data-cy="delete-adapter" matTooltipPosition="above" (click)="deleteAdapter(adapter)">
                         <i class="material-icons">delete</i>
                     </button>
                 </span>
diff --git a/ui/src/app/connect/dialog/delete-adapter-dialog/delete-adapter-dialog.component.html b/ui/src/app/connect/dialog/delete-adapter-dialog/delete-adapter-dialog.component.html
index 9f8beed14..72ca41f8e 100644
--- a/ui/src/app/connect/dialog/delete-adapter-dialog/delete-adapter-dialog.component.html
+++ b/ui/src/app/connect/dialog/delete-adapter-dialog/delete-adapter-dialog.component.html
@@ -33,7 +33,7 @@
             <div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
                 <button mat-button mat-raised-button color="accent"
                         (click)="deleteAdapter()"
-                        data-cy="delete-adapter">Delete
+                        data-cy="delete-adapter-confirmation">Delete
                     adapter
                 </button>
             </div>
diff --git a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
index ab7a759d1..01955e5e2 100644
--- a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
+++ b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
@@ -93,7 +93,7 @@
                     <button color="accent" mat-button mat-icon-button matTooltip="Delete pipeline"
                             matTooltipPosition="above"
                             (click)="pipelineOperationsService.showDeleteDialog(pipeline, refreshPipelinesEmitter)"
-                            data-cy="delete">
+                            data-cy="delete-pipeline">
                         <i class="material-icons">delete</i>
                     </button>
                 </span>


[incubator-streampipes] 02/05: [hotfix] Fix connect schema rule test

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 4bb2d2c7aa10f3bbcdfe9cbb8436bafe316997fe
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Aug 1 16:29:49 2022 +0200

    [hotfix] Fix connect schema rule test
---
 ui/cypress/fixtures/connect/schemaRules/expected.csv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cypress/fixtures/connect/schemaRules/expected.csv b/ui/cypress/fixtures/connect/schemaRules/expected.csv
index 38a8aebd7..411fac981 100644
--- a/ui/cypress/fixtures/connect/schemaRules/expected.csv
+++ b/ui/cypress/fixtures/connect/schemaRules/expected.csv
@@ -1,2 +1,2 @@
-count;staticpropertyname;temperature
+count;staticPropertyName;temperature
 122.0;id1;11.0


[incubator-streampipes] 05/05: [hotfix] Fix test widget data configuration

Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 94d97443e74204793de84bddb884c7dedb70b269
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Aug 1 17:23:42 2022 +0200

    [hotfix] Fix test widget data configuration
---
 ui/cypress/fixtures/datalake/sample.csv            | 20 ++++-----
 ui/cypress/support/utils/DataLakeUtils.ts          |  2 +-
 .../tests/datalake/configuration.smoke.spec.ts     | 48 +++++++++++-----------
 .../datalake/widgetDataConfiguration.smoke.spec.ts |  3 ++
 4 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/ui/cypress/fixtures/datalake/sample.csv b/ui/cypress/fixtures/datalake/sample.csv
index 355a4a0e5..09d14902e 100644
--- a/ui/cypress/fixtures/datalake/sample.csv
+++ b/ui/cypress/fixtures/datalake/sample.csv
@@ -1,11 +1,11 @@
 timestamp;randombool;randomnumber;randomtext
-1623871499055;true;62.0;c
-1623871500059;false;46.0;a
-1623871501064;true;41.0;b
-1623871502070;true;41.0;b
-1623871503078;false;22.0;b
-1623871504082;true;56.0;a
-1623871505084;false;77.0;b
-1623871506086;true;77.0;a
-1623871507091;true;85.0;b
-1623871508093;false;22.0;a
+1653871499055;true;62.0;c
+1653871500059;false;46.0;a
+1653871501064;true;41.0;b
+1653871502070;true;41.0;b
+1653871503078;false;22.0;b
+1653871504082;true;56.0;a
+1653871505084;false;77.0;b
+1653871506086;true;77.0;a
+1653871507091;true;85.0;b
+1653871508093;false;22.0;a
diff --git a/ui/cypress/support/utils/DataLakeUtils.ts b/ui/cypress/support/utils/DataLakeUtils.ts
index 7a28f9bce..3f131eebd 100644
--- a/ui/cypress/support/utils/DataLakeUtils.ts
+++ b/ui/cypress/support/utils/DataLakeUtils.ts
@@ -65,7 +65,7 @@ export class DataLakeUtils {
     DataLakeUtils.selectTimeRange(
         new Date(2020, 10, 20, 22, 44),
         new Date(2021, 10, 20, 22, 44));
-    DataLakeUtils.addNewWidget();
+    // DataLakeUtils.addNewWidget();
     DataLakeUtils.selectDataSet(dataSet);
     DataLakeUtils.dataConfigSelectAllFields();
     DataLakeUtils.selectVisualizationConfig();
diff --git a/ui/cypress/tests/datalake/configuration.smoke.spec.ts b/ui/cypress/tests/datalake/configuration.smoke.spec.ts
index 0da18a504..58170acae 100644
--- a/ui/cypress/tests/datalake/configuration.smoke.spec.ts
+++ b/ui/cypress/tests/datalake/configuration.smoke.spec.ts
@@ -20,38 +20,38 @@ import { PipelineUtils } from '../../support/utils/PipelineUtils';
 import { DataLakeUtils } from '../../support/utils/DataLakeUtils';
 
 
-// describe('Test Truncate data in datalake', () => {
+describe('Test Truncate data in datalake', () => {
 
-//   beforeEach('Setup Test', () => {
-//     cy.initStreamPipesTest();
-//     DataLakeUtils.loadRandomDataSetIntoDataLake();
-//   });
+  beforeEach('Setup Test', () => {
+    cy.initStreamPipesTest();
+    DataLakeUtils.loadRandomDataSetIntoDataLake();
+  });
 
-//   it('Perform Test', () => {
+  it('Perform Test', () => {
 
-//     DataLakeUtils.goToDatalakeConfiguration();
+    DataLakeUtils.goToDatalakeConfiguration();
 
-//     // Check if amount of events is correct
-//     cy.dataCy('datalake-number-of-events', { timeout: 10000 })
-//       .should('be.visible')
-//       .contains('10');
+    // Check if amount of events is correct
+    cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+      .should('be.visible')
+      .contains('10');
 
-//     // Truncate data
-//     cy.dataCy('datalake-truncate-btn')
-//       .should('be.visible')
-//       .click();
-//     cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
-//       .should('be.visible')
-//       .click();
+    // Truncate data
+    cy.dataCy('datalake-truncate-btn')
+      .should('be.visible')
+      .click();
+    cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
+      .should('be.visible')
+      .click();
 
-//     // Check if amount of events is zero
-//     cy.dataCy('datalake-number-of-events', { timeout: 10000 })
-//       .should('be.visible')
-//       .contains('0');
+    // Check if amount of events is zero
+    cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+      .should('be.visible')
+      .contains('0');
 
-//   });
+  });
 
-// });
+});
 
 describe('Delete data in datalake', () => {
 
diff --git a/ui/cypress/tests/datalake/widgetDataConfiguration.smoke.spec.ts b/ui/cypress/tests/datalake/widgetDataConfiguration.smoke.spec.ts
index c055c63cc..a97e5d34e 100644
--- a/ui/cypress/tests/datalake/widgetDataConfiguration.smoke.spec.ts
+++ b/ui/cypress/tests/datalake/widgetDataConfiguration.smoke.spec.ts
@@ -25,6 +25,9 @@ describe('Test Table View in Data Explorer', () => {
   beforeEach('Setup Test', () => {
     cy.initStreamPipesTest();
     DataLakeUtils.loadDataIntoDataLake('datalake/sample.csv');
+    // cy.login();
+    // DataLakeUtils.goToDatalake();
+
   });
 
   it('Perform Test', () => {