From b7b7173ac362ce8b2399d1a4b01546d21c77583b Mon Sep 17 00:00:00 2001 From: Philipp Zehnder Date: Thu, 5 Dec 2024 11:57:14 +0100 Subject: [PATCH 1/4] fix(#3369): Add timeout to select node --- ui/cypress/support/utils/connect/OpcUaUtils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/cypress/support/utils/connect/OpcUaUtils.ts b/ui/cypress/support/utils/connect/OpcUaUtils.ts index 31d3f7f326..5bd0e81ef2 100644 --- a/ui/cypress/support/utils/connect/OpcUaUtils.ts +++ b/ui/cypress/support/utils/connect/OpcUaUtils.ts @@ -31,9 +31,11 @@ export class OpcUaUtils { ConnectUtils.selectAdapter(adapterInput.adapterType); // Wait for the first static property to be rendered - cy.dataCy(adapterInput.adapterConfiguration[0].selector).should( - 'be.visible', - ); + cy.dataCy(adapterInput.adapterConfiguration[0].selector, { + timeout: 10000, + }) + //.scrollIntoView() + .should('be.visible'); // Validate that no error is not shown when nothing is configured cy.dataCy('reloading-nodes', { timeout: 3000 }).should('not.exist'); ErrorMessageUtils.getExceptionComponent().should('not.exist'); From a79fb46560c7b200b3f574cbe7d5e91ca110a943 Mon Sep 17 00:00:00 2001 From: Philipp Zehnder Date: Thu, 5 Dec 2024 12:24:18 +0100 Subject: [PATCH 2/4] fix(#3369): Remove unused comment --- ui/cypress/support/utils/connect/OpcUaUtils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/cypress/support/utils/connect/OpcUaUtils.ts b/ui/cypress/support/utils/connect/OpcUaUtils.ts index 5bd0e81ef2..b250339d3d 100644 --- a/ui/cypress/support/utils/connect/OpcUaUtils.ts +++ b/ui/cypress/support/utils/connect/OpcUaUtils.ts @@ -33,9 +33,7 @@ export class OpcUaUtils { // Wait for the first static property to be rendered cy.dataCy(adapterInput.adapterConfiguration[0].selector, { timeout: 10000, - }) - //.scrollIntoView() - .should('be.visible'); + }).should('be.visible'); // Validate that no error is not shown when nothing is configured cy.dataCy('reloading-nodes', { timeout: 3000 }).should('not.exist'); ErrorMessageUtils.getExceptionComponent().should('not.exist'); From 0e2c80de4a9d18c87d76ff29b142438b757b49f8 Mon Sep 17 00:00:00 2001 From: Philipp Zehnder Date: Thu, 5 Dec 2024 13:00:19 +0100 Subject: [PATCH 3/4] fix(#3369): Test fo fail test --- ui/cypress/support/utils/connect/OpcUaUtils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/cypress/support/utils/connect/OpcUaUtils.ts b/ui/cypress/support/utils/connect/OpcUaUtils.ts index b250339d3d..e59b158f6a 100644 --- a/ui/cypress/support/utils/connect/OpcUaUtils.ts +++ b/ui/cypress/support/utils/connect/OpcUaUtils.ts @@ -31,9 +31,12 @@ export class OpcUaUtils { ConnectUtils.selectAdapter(adapterInput.adapterType); // Wait for the first static property to be rendered - cy.dataCy(adapterInput.adapterConfiguration[0].selector, { - timeout: 10000, - }).should('be.visible'); + // cy.dataCy(adapterInput.adapterConfiguration[0].selector, { + // timeout: 10000, + // }).should('be.visible'); + cy.dataCy(adapterInput.adapterConfiguration[0].selector).should( + 'be.visible', + ); // Validate that no error is not shown when nothing is configured cy.dataCy('reloading-nodes', { timeout: 3000 }).should('not.exist'); ErrorMessageUtils.getExceptionComponent().should('not.exist'); From d9d1d80f40c57bd081082c11a3f55ab4b521b6f9 Mon Sep 17 00:00:00 2001 From: Philipp Zehnder Date: Thu, 5 Dec 2024 14:04:21 +0100 Subject: [PATCH 4/4] fix(#3369): Tried to fix flaky test with scrollIntoView --- ui/cypress/support/utils/connect/OpcUaUtils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/cypress/support/utils/connect/OpcUaUtils.ts b/ui/cypress/support/utils/connect/OpcUaUtils.ts index e59b158f6a..e007119445 100644 --- a/ui/cypress/support/utils/connect/OpcUaUtils.ts +++ b/ui/cypress/support/utils/connect/OpcUaUtils.ts @@ -31,12 +31,12 @@ export class OpcUaUtils { ConnectUtils.selectAdapter(adapterInput.adapterType); // Wait for the first static property to be rendered - // cy.dataCy(adapterInput.adapterConfiguration[0].selector, { - // timeout: 10000, - // }).should('be.visible'); - cy.dataCy(adapterInput.adapterConfiguration[0].selector).should( - 'be.visible', - ); + cy.dataCy(adapterInput.adapterConfiguration[0].selector, { + timeout: 10000, + }) + .scrollIntoView() + .should('be.visible'); + // Validate that no error is not shown when nothing is configured cy.dataCy('reloading-nodes', { timeout: 3000 }).should('not.exist'); ErrorMessageUtils.getExceptionComponent().should('not.exist');