This is an automated email from the ASF dual-hosted git repository. tenthe pushed a commit to branch fix-e2e-tests in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 119b86535f012f3e92d3b7caddee0ebcba6256da Author: Philipp Zehnder <[email protected]> AuthorDate: Mon Jul 27 11:52:47 2026 +0000 test: update adapter edit rename flow --- ui/cypress/support/utils/connect/ConnectBtns.ts | 4 ---- ui/cypress/support/utils/connect/ConnectUtils.ts | 15 ++++++--------- ui/cypress/tests/connect/editAdapter.spec.ts | 6 +++--- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ui/cypress/support/utils/connect/ConnectBtns.ts b/ui/cypress/support/utils/connect/ConnectBtns.ts index a6d0cc8fc6..733ed0f356 100644 --- a/ui/cypress/support/utils/connect/ConnectBtns.ts +++ b/ui/cypress/support/utils/connect/ConnectBtns.ts @@ -147,10 +147,6 @@ export class ConnectBtns { return cy.dataCy('stop-all-adapters-btn'); } - public static showCodeCheckbox() { - return cy.dataCy('show-code-checkbox'); - } - public static showAdapterCode() { return cy.dataCy('show-adapter-code', { timeout: 10000 }); } diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts b/ui/cypress/support/utils/connect/ConnectUtils.ts index 1ead7ab2e5..6879d522b7 100644 --- a/ui/cypress/support/utils/connect/ConnectUtils.ts +++ b/ui/cypress/support/utils/connect/ConnectUtils.ts @@ -143,11 +143,6 @@ export class ConnectUtils { } } - public static renameAdapter(newName: string) { - ConnectBtns.adapterNameInput().clear().type(newName); - ConnectBtns.adapterNameInput().should('have.value', newName); - } - public static manageEditedAdapter(newName: string, assetNameList = []) { ConnectBtns.adapterConfigurationOptions().click(); ConnectBtns.manageAdapter().click(); @@ -155,10 +150,12 @@ export class ConnectUtils { ConnectBtns.managedResourceName().clear().type(newName); ConnectBtns.managedResourceName().should('have.value', newName); - cy.get('mat-tree.asset-tree', { timeout: 10000 }).should('exist'); - assetNameList.forEach(assetName => { - this.selectAssetTreeNode(assetName); - }); + if (assetNameList.length > 0) { + cy.get('mat-tree.asset-tree', { timeout: 10000 }).should('exist'); + assetNameList.forEach(assetName => { + this.selectAssetTreeNode(assetName); + }); + } ConnectBtns.manageResourceSave().click(); ConnectBtns.manageResourceSave().should('not.exist'); diff --git a/ui/cypress/tests/connect/editAdapter.spec.ts b/ui/cypress/tests/connect/editAdapter.spec.ts index c43bf59235..151f4ea758 100644 --- a/ui/cypress/tests/connect/editAdapter.spec.ts +++ b/ui/cypress/tests/connect/editAdapter.spec.ts @@ -44,7 +44,9 @@ describe('Test Edit Adapter', () => { ConnectBtns.editAdapter().should('not.be.disabled'); ConnectBtns.editAdapter().click(); - // Change adapter name and wait time + ConnectUtils.manageEditedAdapter(newAdapterName); + + // Change adapter wait time const newUserConfiguration = AdapterBuilder.create( 'Machine_Data_Simulator', @@ -66,8 +68,6 @@ describe('Test Edit Adapter', () => { ConnectUtils.refreshEventSchema(); ConnectUtils.finishConfigureFieldsConfiguration(); - ConnectBtns.adapterNameInput().clear().type(newAdapterName); - // This wait is required to ensure that there is no couch db update conflict ConnectBtns.storeEditAdapter().click();
