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

zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new c0dd74c55a fix(#3247): Add waiting time and add test to smoke tests 
(#3248)
c0dd74c55a is described below

commit c0dd74c55ad5125e03393e0da0862e503c3c14d4
Author: Philipp Zehnder <[email protected]>
AuthorDate: Wed Sep 25 12:29:59 2024 +0200

    fix(#3247): Add waiting time and add test to smoke tests (#3248)
    
    * fix(#3247): Add waiting time and add test to smoke tests
    
    * fix(#3247): Fix linting
    
    * fix(#3247): Try to remove the loop
    
    * fix(#3247): Add timeout to open new data view
    
    * fix(#3247): Change opc ua test and rime range test
---
 ui/cypress/support/utils/datalake/DataLakeUtils.ts           |  6 +++---
 ui/cypress/tests/datalake/timeRangeSelectors.spec.ts         |  5 +++--
 .../static-runtime-resolvable-tree-input.component.ts        | 12 +++++++++++-
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/ui/cypress/support/utils/datalake/DataLakeUtils.ts 
b/ui/cypress/support/utils/datalake/DataLakeUtils.ts
index de72c60baa..664c2ccd1c 100644
--- a/ui/cypress/support/utils/datalake/DataLakeUtils.ts
+++ b/ui/cypress/support/utils/datalake/DataLakeUtils.ts
@@ -91,7 +91,7 @@ export class DataLakeUtils {
         widgetType: string,
     ) {
         DataLakeUtils.goToDatalake();
-        DataLakeUtils.createAndEditDataView(dataViewName);
+        DataLakeUtils.createAndEditDataView();
 
         DataLakeUtils.selectTimeRange(
             new Date(2020, 10, 20, 22, 44),
@@ -162,7 +162,7 @@ export class DataLakeUtils {
 
     public static createAndEditDataView() {
         // Create new data view
-        cy.dataCy('open-new-data-view').click();
+        cy.dataCy('open-new-data-view', { timeout: 10000 }).click();
     }
 
     public static removeWidget(dataViewName: string) {
@@ -425,7 +425,7 @@ export class DataLakeUtils {
     }
 
     public static openTimeSelectorMenu() {
-        cy.dataCy('time-selector-menu').click();
+        cy.dataCy('time-selector-menu', { timeout: 10000 }).click();
     }
 
     public static applyCustomTimeSelection() {
diff --git a/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts 
b/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts
index e2a8faff84..efecf9fc9b 100644
--- a/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts
+++ b/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts
@@ -44,11 +44,12 @@ describe('Test Time Range Selectors in Data Explorer', () 
=> {
     before('Setup Tests', () => {
         cy.initStreamPipesTest();
         DataLakeUtils.loadDataIntoDataLake('datalake/sample.csv', false);
-        DataLakeUtils.goToDatalake();
-        DataLakeUtils.createAndEditDataView();
     });
 
     it('Perform Test', () => {
+        DataLakeUtils.goToDatalake();
+        DataLakeUtils.createAndEditDataView();
+
         periods.forEach(period => {
             cy.log('Testing period: ' + period.selector);
             DataLakeUtils.openTimeSelectorMenu();
diff --git 
a/ui/src/app/core-ui/static-properties/static-runtime-resolvable-tree-input/static-runtime-resolvable-tree-input.component.ts
 
b/ui/src/app/core-ui/static-properties/static-runtime-resolvable-tree-input/static-runtime-resolvable-tree-input.component.ts
index 64e89804aa..7c306ce446 100644
--- 
a/ui/src/app/core-ui/static-properties/static-runtime-resolvable-tree-input/static-runtime-resolvable-tree-input.component.ts
+++ 
b/ui/src/app/core-ui/static-properties/static-runtime-resolvable-tree-input/static-runtime-resolvable-tree-input.component.ts
@@ -58,7 +58,17 @@ export class StaticRuntimeResolvableTreeInputComponent
     }
 
     ngOnInit(): void {
-        this.resetStaticPropertyStateAndReload();
+        // if a node is selected it is assumed the adapter was opened in edit 
mode
+        // when that is the case, the browse tree should be reloaded
+        // if the adapter is created, the reload should only be triggered if 
all previous configurations are set correctly
+        if (
+            this.staticProperty.selectedNodesInternalNames &&
+            this.staticProperty.selectedNodesInternalNames.length > 0
+        ) {
+            this.resetStaticPropertyStateAndReload();
+        } else {
+            this.resetStaticPropertyState();
+        }
 
         if (
             this.staticProperty.nodes.length === 0 &&

Reply via email to