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
diff --git a/ui/cypress/support/utils/datalake/DataLakeUtils.ts b/ui/cypress/support/utils/datalake/DataLakeUtils.ts
index de72c60..664c2cc 100644
--- a/ui/cypress/support/utils/datalake/DataLakeUtils.ts
+++ b/ui/cypress/support/utils/datalake/DataLakeUtils.ts
@@ -91,7 +91,7 @@
widgetType: string,
) {
DataLakeUtils.goToDatalake();
- DataLakeUtils.createAndEditDataView(dataViewName);
+ DataLakeUtils.createAndEditDataView();
DataLakeUtils.selectTimeRange(
new Date(2020, 10, 20, 22, 44),
@@ -162,7 +162,7 @@
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 @@
}
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 e2a8faf..efecf9f 100644
--- a/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts
+++ b/ui/cypress/tests/datalake/timeRangeSelectors.spec.ts
@@ -44,11 +44,12 @@
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 64e8980..7c306ce 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 @@
}
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 &&