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 e45d7c97de Cypress Test Code Structure: Harmonization between Bnt and 
Utils (#3915)
e45d7c97de is described below

commit e45d7c97def3c7adc570a0f30fe740a4b5f253d5
Author: Jacqueline Höllig <[email protected]>
AuthorDate: Thu Nov 13 13:30:55 2025 +0100

    Cypress Test Code Structure: Harmonization between Bnt and Utils (#3915)
---
 ui/cypress/support/utils/UserUtils.ts              |  12 +--
 ui/cypress/support/utils/connect/ConnectBtns.ts    |  38 +++++++-
 ui/cypress/support/utils/connect/ConnectUtils.ts   |  50 ++++-------
 .../support/utils/dataExplorer/DataExplorerBtns.ts | 100 +++++++++++++++++++--
 .../utils/dataExplorer/DataExplorerUtils.ts        |  58 ++++++------
 ui/cypress/support/utils/pipeline/PipelineBtns.ts  |  57 ++++++++++++
 ui/cypress/support/utils/pipeline/PipelineUtils.ts |  41 ++++-----
 ui/cypress/support/utils/user/UserBtns.ts          |  22 +++++
 .../editAdapterSettingsAndPipeline.smoke.spec.ts   |  21 ++---
 .../editAdapterTransformationRulesAreKept.spec.ts  |  20 ++---
 .../connect/editAdapterValuesAndFields.spec.ts     |  12 +--
 .../tests/dataExplorer/configuration.smoke.spec.ts |  20 ++---
 .../tests/pipeline/renamePipelineTest.spec.ts      |   5 +-
 .../pipeline/updatePipelineTest.smoke.spec.ts      |   3 +-
 .../PipelineElementDocumentation.spec.ts           |   5 +-
 .../connectConfigurationTemplate.spec.ts           |   3 +-
 .../userManagement/testGroupManagement.spec.ts     |  11 +--
 17 files changed, 324 insertions(+), 154 deletions(-)

diff --git a/ui/cypress/support/utils/UserUtils.ts 
b/ui/cypress/support/utils/UserUtils.ts
index ff660fae37..e5557d0ad1 100644
--- a/ui/cypress/support/utils/UserUtils.ts
+++ b/ui/cypress/support/utils/UserUtils.ts
@@ -43,14 +43,14 @@ export class UserUtils {
 
     public static goToUserConfiguration() {
         cy.visit('#/configuration/security');
-        cy.dataCy('add-new-user', { timeout: 10000 }).should('exist');
+        UserBtns.newUserBtn().should('exist');
     }
 
     public static addUser(user: User) {
         this.goToUserConfiguration();
 
         // user configuration
-        cy.dataCy('add-new-user', { timeout: 10000 }).click();
+        UserBtns.newUserBtn().click();
         cy.dataCy('new-user-email').type(user.email);
         cy.dataCy('new-user-full-name').type(user.name);
         cy.dataCy('new-user-password').type(user.password);
@@ -62,10 +62,10 @@ export class UserUtils {
                 .children()
                 .click();
         }
-        cy.dataCy('new-user-enabled').children().click();
+        UserBtns.activateUserBtn().children().click();
 
         // Store
-        cy.dataCy('sp-element-edit-user-save').click();
+        UserBtns.saveEditUserBtn().click();
     }
 
     public static toggleUserRole(user: User, role: UserRole) {
@@ -114,7 +114,7 @@ export class UserUtils {
     public static deleteUser(user: User) {
         this.goToUserConfiguration();
 
-        cy.dataCy('user-delete-btn-' + user.name).click();
-        cy.dataCy('confirm-delete').click();
+        UserBtns.deleteUserBtn(user.name).click();
+        UserBtns.confirmDeleteBtn().click();
     }
 }
diff --git a/ui/cypress/support/utils/connect/ConnectBtns.ts 
b/ui/cypress/support/utils/connect/ConnectBtns.ts
index c0940f8c16..0b0bb06671 100644
--- a/ui/cypress/support/utils/connect/ConnectBtns.ts
+++ b/ui/cypress/support/utils/connect/ConnectBtns.ts
@@ -23,7 +23,7 @@ export class ConnectBtns {
     }
 
     public static deleteAdapter() {
-        return cy.dataCy('delete-adapter', { timeout: 10000 });
+        return cy.dataCy('delete-adapter', { timeout: 20000 });
     }
 
     public static moreOptions() {
@@ -72,6 +72,14 @@ export class ConnectBtns {
         return cy.get('button').contains('Next').parent();
     }
 
+    public static deleteAdapterConfirmationButton() {
+        return cy.dataCy('delete-adapter-confirmation');
+    }
+
+    public static connectNewAdapterCancel() {
+        return cy.dataCy('connect-new-adapter-cancel');
+    }
+
     // =====================  Adapter settings btns  ==========================
     public static adapterSettingsStartAdapter() {
         return cy.dataCy('adapter-settings-start-adapter-btn');
@@ -93,10 +101,34 @@ export class ConnectBtns {
         return cy.dataCy('show-code-checkbox');
     }
 
+    public static deleteAdapterAndAssociatedPipelineConfirmation() {
+        return cy.dataCy(
+            'delete-adapter-and-associated-pipelines-confirmation',
+            {
+                timeout: 10000,
+            },
+        );
+    }
+
+    public static showAssetCheckbox() {
+        return cy.dataCy('show-asset-checkbox');
+    }
+
+    public static connectRemoveDuplicateBox() {
+        return cy.dataCy('connect-remove-duplicates-box');
+    }
+    public static connectReduceEventRate() {
+        return cy.dataCy('connect-reduce-event-rate-box');
+    }
+
     public static assetCheckbox() {
         return cy.dataCy('show-asset-checkbox');
     }
 
+    public static adapterSettingsNextBtn() {
+        return cy.dataCy('adapter-settings-next-button');
+    }
+
     // ========================================================================
 
     // =====================  Event Schema buttons  ==========================
@@ -149,6 +181,10 @@ export class ConnectBtns {
         });
     }
 
+    public static schemaNextBtn() {
+        return cy.dataCy('sp-event-schema-next-button');
+    }
+
     // ========================================================================
 
     // =====================  Format configurations  ==========================
diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts 
b/ui/cypress/support/utils/connect/ConnectUtils.ts
index db144b1765..41c92eecf0 100644
--- a/ui/cypress/support/utils/connect/ConnectUtils.ts
+++ b/ui/cypress/support/utils/connect/ConnectUtils.ts
@@ -254,7 +254,7 @@ export class ConnectUtils {
     }
 
     public static addToAsset(assetNameList = []) {
-        cy.dataCy('show-asset-checkbox').click();
+        ConnectBtns.showAssetCheckbox().click();
         cy.get('mat-tree.asset-tree', { timeout: 10000 }).should('exist');
 
         assetNameList.forEach(assetName => {
@@ -288,15 +288,12 @@ export class ConnectUtils {
         this.goToConnect();
 
         GeneralUtils.openMenuForRow(adapterName);
-        cy.dataCy('delete-adapter').should('have.length', 1);
+        ConnectBtns.deleteAdapter().should('have.length', 1);
         this.clickDelete();
         cy.dataCy('adapter-deletion-in-progress', { timeout: 10000 }).should(
             'be.visible',
         );
-        cy.dataCy('delete-adapter', { timeout: 20000 }).should(
-            'have.length',
-            0,
-        );
+        ConnectBtns.deleteAdapter().should('have.length', 0);
     }
 
     public static storeAndStartEditedAdapter() {
@@ -313,12 +310,10 @@ export class ConnectUtils {
         ConnectBtns.openActionsMenu('simulator');
         cy.dataCy('delete-adapter').should('have.length', 1);
         this.clickDelete();
-        cy.dataCy('delete-adapter-and-associated-pipelines-confirmation', {
-            timeout: 10000,
-        }).should('be.visible');
-        cy.dataCy(
-            'delete-adapter-and-associated-pipelines-confirmation',
-        ).click();
+        ConnectBtns.deleteAdapterAndAssociatedPipelineConfirmation().should(
+            'be.visible',
+        );
+        ConnectBtns.deleteAdapterAndAssociatedPipelineConfirmation().click();
         cy.dataCy('adapter-deletion-in-progress', { timeout: 10000 }).should(
             'be.visible',
         );
@@ -336,14 +331,12 @@ export class ConnectUtils {
         // Associated pipelines not owned by the user (unless admin) should 
not be deleted during adapter deletion
         this.goToConnect();
         ConnectBtns.openActionsMenu('simulator');
-        cy.dataCy('delete-adapter').should('have.length', 1);
+        ConnectBtns.deleteAdapter().should('have.length', 1);
         this.clickDelete();
-        cy.dataCy('delete-adapter-and-associated-pipelines-confirmation', {
-            timeout: 10000,
-        }).should('be.visible');
-        cy.dataCy(
-            'delete-adapter-and-associated-pipelines-confirmation',
-        ).click();
+        ConnectBtns.deleteAdapterAndAssociatedPipelineConfirmation().should(
+            'be.visible',
+        );
+        ConnectBtns.deleteAdapterAndAssociatedPipelineConfirmation().click();
         cy.dataCy('adapter-deletion-permission-denied', {
             timeout: 10000,
         }).should('be.visible');
@@ -352,29 +345,20 @@ export class ConnectUtils {
     }
 
     public static clickDelete() {
-        cy.dataCy('delete-adapter').click();
-        cy.dataCy('delete-adapter-confirmation').click();
+        ConnectBtns.deleteAdapter().click();
+        ConnectBtns.deleteAdapterConfirmationButton().click();
     }
 
     public static checkAdapterNotDeleted() {
         this.goToConnect();
-        cy.dataCy('delete-adapter', { timeout: 20000 }).should(
-            'have.length',
-            1,
-        );
+        ConnectBtns.deleteAdapter().should('have.length', 1);
     }
 
     public static checkAdapterAndAssociatedPipelinesDeleted() {
         this.goToConnect();
-        cy.dataCy('delete-adapter', { timeout: 20000 }).should(
-            'have.length',
-            0,
-        );
+        ConnectBtns.deleteAdapter().should('have.length', 0);
         PipelineUtils.goToPipelines();
-        cy.dataCy('delete-pipeline', { timeout: 10000 }).should(
-            'have.length',
-            0,
-        );
+        ConnectBtns.deleteAdapter().should('have.length', 0);
     }
 
     public static setUpPreprocessingRuleTest(
diff --git a/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts 
b/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
index 275a1d9a77..7e1226adea 100644
--- a/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
+++ b/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
@@ -16,19 +16,17 @@
  *
  */
 
-import { GeneralUtils } from '../GeneralUtils';
-
 export class DataExplorerBtns {
     public static refreshDataLakeMeasures() {
         return cy.dataCy('refresh-data-lake-measures');
     }
 
     public static saveDataViewButton() {
-        return cy.dataCy('save-data-view-btn').click();
+        return cy.dataCy('save-data-view-btn', { timeout: 10000 });
     }
 
     public static saveDashboard() {
-        return cy.dataCy('save-data-view').click();
+        return cy.dataCy('save-data-view');
     }
     public static saveChartsToAssetBtn() {
         return cy
@@ -37,6 +35,54 @@ export class DataExplorerBtns {
             .click();
     }
 
+    public static deleteDashboardBtn(dashboardName) {
+        return cy.dataCy('delete-dashboard-' + dashboardName, {
+            timeout: 10000,
+        });
+    }
+
+    public static deleteDataViewBtn(dataViewName) {
+        return cy.dataCy('delete-data-view-' + dataViewName, {
+            timeout: 10000,
+        });
+    }
+
+    public static confirmDelete() {
+        return cy.dataCy('confirm-delete', { timeout: 10000 });
+    }
+
+    public static cancelDelete() {
+        return cy.dataCy('cancel-delete', { timeout: 10000 });
+    }
+
+    public static saveDashboardConfigurationBtn() {
+        return cy.dataCy('save-dashboard-btn', { timeout: 10000 });
+    }
+
+    public static removeWidgetBtn(dataViewName) {
+        return cy.dataCy('remove-' + dataViewName);
+    }
+
+    public static editDashboardBtn(dashboardName) {
+        return cy.dataCy('edit-dashboard-' + dashboardName);
+    }
+
+    public static editDashboardSettingsBtn(dashboardName) {
+        return cy.dataCy('edit-dashboard-settings-' + dashboardName);
+    }
+
+    public static openNewDataViewBtn() {
+        return cy.dataCy('open-new-data-view', { timeout: 10000 });
+    }
+
+    public static addDataViewBtn(dataViewName) {
+        return cy.dataCy('add-data-view-btn-' + dataViewName);
+    }
+
+    public static newDashboardDialogBtn() {
+        return cy.dataCy('open-new-dashboard-dialog');
+    }
+
     public static chartAssetCheckboxBtn() {
         return cy.dataCy('add-to-Asset-data-view-btn');
     }
@@ -45,11 +91,47 @@ export class DataExplorerBtns {
             .dataCy('asset-dialog-confirm-delete', { timeout: 10000 })
             .click();
     }
-    public static editDataViewButton(widgetName: string) {
-        GeneralUtils.openMenuForRow(widgetName);
-        return cy
-            .dataCy('edit-data-view-' + widgetName.replaceAll(' ', ''))
-            .click();
+    public static editDataViewButton(dataViewName: string) {
+        return cy.dataCy('edit-data-view-' + dataViewName);
+    }
+
+    public static editWidget(widgetName: string) {
+        return cy.dataCy('edit-' + widgetName);
+    }
+
+    public static moreOptionsBtn(widgetName) {
+        return cy.dataCy('more-options-' + widgetName);
+    }
+
+    public static startEditWidget(widgetName) {
+        return cy.dataCy('start-edit-' + widgetName);
+    }
+
+    public static goBackToOverviewBtn() {
+        return cy.dataCy('save-data-explorer-go-back-to-overview');
+    }
+
+    public static addNewWidgetBtn() {
+        return cy.dataCy('add-new-widget');
+    }
+
+    public static dataLakeTruncateBtn() {
+        return cy.dataCy('datalake-truncate-btn');
+    }
+
+    public static dataLakeDeleteBtn() {
+        return cy.dataCy('datalake-delete-btn');
+    }
+
+    public static confirmDataLakeTruncateBtn() {
+        return cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 });
+    }
+    public static confirmDataLakeDeleteBtn() {
+        return cy.dataCy('confirm-delete-data-btn', { timeout: 10000 });
+    }
+
+    public static datalakeNumberEvents() {
+        return cy.dataCy('datalake-number-of-events', { timeout: 10000 });
     }
 
     public static dashboardAssetCheckboxBtn() {
diff --git a/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts 
b/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
index 67f49c96c3..341a9153a9 100644
--- a/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
+++ b/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
@@ -135,7 +135,7 @@ export class DataExplorerUtils {
 
     public static createDashboard(name) {
         // Create new data view
-        cy.dataCy('open-new-dashboard-dialog').click();
+        DataExplorerBtns.newDashboardDialogBtn().click();
 
         // Configure data view
         cy.dataCy('data-view-name').type(name);
@@ -160,7 +160,7 @@ export class DataExplorerUtils {
     }
 
     public static saveDashboard() {
-        return cy.dataCy('save-data-view').click();
+        return DataExplorerBtns.saveDashboard().click();
     }
     public static addDataViewAndTableWidget(
         dataViewName: string,
@@ -202,11 +202,11 @@ export class DataExplorerUtils {
 
     public static createAndEditDashboard(name: string) {
         // Create new data view
-        cy.dataCy('open-new-dashboard-dialog').click();
+        DataExplorerBtns.newDashboardDialogBtn().click();
 
         // Configure data view
         cy.dataCy('data-view-name').type(name);
-        cy.dataCy('save-data-view').click();
+        DataExplorerBtns.saveDashboard().click();
 
         this.editDashboard(name);
     }
@@ -221,43 +221,43 @@ export class DataExplorerUtils {
                 this.getFutureDate(),
             );
         }
-        cy.dataCy('add-data-view-btn-' + dataViewName).click();
+        DataExplorerBtns.addDataViewBtn(dataViewName).click();
     }
 
     public static createAndEditDataView() {
         // Create new data view
-        cy.dataCy('open-new-data-view', { timeout: 10000 }).click();
+        DataExplorerBtns.openNewDataViewBtn().click();
     }
 
     public static removeWidget(dataViewName: string) {
-        cy.dataCy('remove-' + dataViewName).click();
+        DataExplorerBtns.removeWidgetBtn(dataViewName).click();
     }
 
     public static editDashboard(dashboardName: string) {
         GeneralUtils.openMenuForRow(dashboardName);
-        cy.dataCy('edit-dashboard-' + dashboardName).click();
+        DataExplorerBtns.editDashboardBtn(dashboardName).click();
     }
 
     public static editDashboardSettings(dashboardName: string) {
         GeneralUtils.openMenuForRow(dashboardName);
-        cy.dataCy('edit-dashboard-settings-' + dashboardName).click();
+        DataExplorerBtns.editDashboardSettingsBtn(dashboardName).click();
     }
 
     public static editDataView(dataViewName: string) {
         // Click edit button
         // following only works if single view is available
         GeneralUtils.openMenuForRow(dataViewName);
-        cy.dataCy('edit-data-view-' + dataViewName).click();
+        DataExplorerBtns.editDataViewButton(dataViewName).click();
     }
 
     public static saveDataViewConfiguration() {
-        cy.dataCy('save-data-view-btn', { timeout: 10000 }).click({
+        DataExplorerBtns.saveDataViewButton().click({
             force: true,
         });
     }
 
     public static saveDashboardConfiguration() {
-        cy.dataCy('save-dashboard-btn', { timeout: 10000 }).click();
+        DataExplorerBtns.saveDashboardConfigurationBtn().click();
     }
 
     public static getEmptyDashboardInformation() {
@@ -289,43 +289,35 @@ export class DataExplorerUtils {
 
     public static deleteDashboard(dashboardName: string) {
         GeneralUtils.openMenuForRow(dashboardName);
-        cy.dataCy('delete-dashboard-' + dashboardName, {
-            timeout: 10000,
-        }).click();
-        cy.dataCy('confirm-delete', { timeout: 10000 }).click();
+        DataExplorerBtns.deleteDashboardBtn(dashboardName).click();
+        DataExplorerBtns.confirmDelete().click();
     }
 
     public static deleteDataView(dataViewName: string) {
         GeneralUtils.openMenuForRow(dataViewName);
-        cy.dataCy('delete-data-view-' + dataViewName, {
-            timeout: 10000,
-        }).click();
-        cy.dataCy('confirm-delete', { timeout: 10000 }).click();
+        DataExplorerBtns.deleteDataViewBtn(dataViewName).click();
+        DataExplorerBtns.confirmDelete().click();
     }
 
     public static cancelDeleteDashboard(dashboardName: string) {
         GeneralUtils.openMenuForRow(dashboardName);
-        cy.dataCy('delete-dashboard-' + dashboardName, {
-            timeout: 10000,
-        }).click();
-        cy.dataCy('cancel-delete', { timeout: 10000 }).click();
+        DataExplorerBtns.deleteDashboardBtn(dashboardName).click();
+        DataExplorerBtns.cancelDelete().click();
     }
 
     public static cancelDeleteDataView(dataViewName: string) {
         GeneralUtils.openMenuForRow(dataViewName);
-        cy.dataCy('delete-data-view-' + dataViewName, {
-            timeout: 10000,
-        }).click();
-        cy.dataCy('cancel-delete', { timeout: 10000 }).click();
+        DataExplorerBtns.deleteDataViewBtn(dataViewName).click();
+        DataExplorerBtns.cancelDelete().click();
     }
 
     public static editWidget(widgetName: string) {
-        cy.dataCy('edit-' + widgetName).click();
+        DataExplorerBtns.editWidget(widgetName).click();
     }
 
     public static startEditWidget(widgetName: string) {
-        cy.dataCy('more-options-' + widgetName).click();
-        cy.dataCy('start-edit-' + widgetName).click();
+        DataExplorerBtns.moreOptionsBtn(widgetName).click();
+        DataExplorerBtns.startEditWidget(widgetName).click();
     }
 
     public static saveAndReEditWidget(dataViewName: string) {
@@ -346,11 +338,11 @@ export class DataExplorerUtils {
     }
 
     public static goBackToOverview() {
-        cy.dataCy('save-data-explorer-go-back-to-overview').click();
+        DataExplorerBtns.goBackToOverviewBtn().click();
     }
 
     public static addNewWidget() {
-        cy.dataCy('add-new-widget').click();
+        DataExplorerBtns.addNewWidgetBtn().click();
     }
 
     public static selectDataSet(dataSet: string) {
diff --git a/ui/cypress/support/utils/pipeline/PipelineBtns.ts 
b/ui/cypress/support/utils/pipeline/PipelineBtns.ts
index a79e14dccf..41f2f923f6 100644
--- a/ui/cypress/support/utils/pipeline/PipelineBtns.ts
+++ b/ui/cypress/support/utils/pipeline/PipelineBtns.ts
@@ -28,7 +28,56 @@ export class PipelineBtns {
     public static deletePipeline() {
         return cy.dataCy('delete-pipeline', { timeout: 10000 });
     }
+    public static modifyPipeline() {
+        return cy.dataCy('modify-pipeline-btn');
+    }
+
+    public static pipelinesToEditor() {
+        return cy.dataCy('pipelines-navigate-to-editor');
+    }
+
+    public static editorAddPipelineElement() {
+        return cy.dataCy('sp-editor-add-pipeline-element', { timeout: 10000 });
+    }
+
+    public static possibleElementsBtns(dataSourceName) {
+        return cy.dataCy('sp-possible-elements-' + dataSourceName, {
+            timeout: 10000,
+        });
+    }
+
+    public static selectCompatibleElementBtn(elementName) {
+        return cy.dataCy('sp-compatible-elements-' + elementName);
+    }
+
+    public static saveElementConfigBtn() {
+        return cy.dataCy('sp-element-configuration-save');
+    }
+    public static savePipelineBtn() {
+        return cy.dataCy('sp-editor-save-pipeline');
+    }
 
+    public static pipelineCloneModeBtn() {
+        return cy.dataCy('pipeline-update-mode-clone');
+    }
+
+    public static navigateToOverviewCheckbox() {
+        return cy.dataCy('sp-editor-checkbox-navigate-to-overview');
+    }
+
+    public static editorApplyBtn() {
+        return cy.dataCy('sp-editor-apply');
+    }
+
+    public static navigateToPipelineOverview() {
+        return cy.dataCy('sp-navigate-to-pipeline-overview', {
+            timeout: 15000,
+        });
+    }
+
+    public static settingsPipelineElementBtn() {
+        return cy.dataCy('settings-pipeline-element-button');
+    }
     public static pipelineEditorSave() {
         return cy.dataCy('sp-editor-save-pipeline');
     }
@@ -40,4 +89,12 @@ export class PipelineBtns {
     public static pipelineEditorCancel() {
         return cy.dataCy('sp-editor-cancel');
     }
+
+    public static pipelineIconStandRow() {
+        return cy.dataCy('pipeline-element-icon-stand-row');
+    }
+
+    public static pipelineHelpBtn() {
+        return cy.dataCy('help-button-icon-stand');
+    }
 }
diff --git a/ui/cypress/support/utils/pipeline/PipelineUtils.ts 
b/ui/cypress/support/utils/pipeline/PipelineUtils.ts
index ebb619c216..62d76cd996 100644
--- a/ui/cypress/support/utils/pipeline/PipelineUtils.ts
+++ b/ui/cypress/support/utils/pipeline/PipelineUtils.ts
@@ -81,7 +81,7 @@ export class PipelineUtils {
 
     public static editPipeline(pipelineName: string) {
         GeneralUtils.openMenuForRow(pipelineName);
-        cy.dataCy('modify-pipeline-btn').first().click();
+        PipelineBtns.modifyPipeline().first().click();
     }
 
     public static goToPipelines() {
@@ -91,7 +91,7 @@ export class PipelineUtils {
     public static goToPipelineEditor() {
         // Go to StreamPipes editor
         this.goToPipelines();
-        cy.dataCy('pipelines-navigate-to-editor').click();
+        PipelineBtns.pipelinesToEditor().click();
     }
 
     public static selectDataStream(pipelineInput: PipelineInput) {
@@ -99,18 +99,16 @@ export class PipelineUtils {
         cy.dataCy('sp-pipeline-element-selection', { timeout: 10000 }).should(
             'be.visible',
         );
-        cy.dataCy('sp-editor-add-pipeline-element').click();
+        PipelineBtns.editorAddPipelineElement().click();
         cy.dataCy(pipelineInput.dataSource, { timeout: 10000 }).click();
     }
 
     public static openPossibleElementsMenu(dataSourceName: string) {
-        cy.dataCy('sp-possible-elements-' + dataSourceName, {
-            timeout: 10000,
-        }).click();
+        PipelineBtns.possibleElementsBtns(dataSourceName).click();
     }
 
     public static selectCompatibleElement(elementName: string) {
-        cy.dataCy('sp-compatible-elements-' + elementName).click();
+        PipelineBtns.selectCompatibleElementBtn(elementName).click();
     }
 
     public static configureProcessingElement(
@@ -122,7 +120,7 @@ export class PipelineUtils {
     }
 
     private static savePipelineElementConfiguration() {
-        cy.dataCy('sp-element-configuration-save').click();
+        PipelineBtns.saveElementConfigBtn().click();
     }
 
     private static configurePipeline(pipelineInput: PipelineInput) {
@@ -135,25 +133,24 @@ export class PipelineUtils {
             this.savePipelineElementConfiguration();
 
             // Select sink
-            cy.dataCy(
-                'sp-possible-elements-' + pipelineInput.processingElement.name,
-                { timeout: 10000 },
+            PipelineBtns.possibleElementsBtns(
+                pipelineInput.processingElement.name,
             ).click();
         }
 
         // Configure sink
-        cy.dataCy(
-            'sp-compatible-elements-' + pipelineInput.dataSink.name,
+        PipelineBtns.selectCompatibleElementBtn(
+            pipelineInput.dataSink.name,
         ).click();
         StaticPropertyUtils.input(pipelineInput.dataSink.config);
 
         // Save sink configuration
-        cy.dataCy('sp-element-configuration-save').click();
+        PipelineBtns.saveElementConfigBtn().click();
     }
 
     public static startPipeline(pipelineInput?: PipelineInput) {
         // Save and start pipeline
-        cy.dataCy('sp-editor-save-pipeline').click();
+        PipelineBtns.savePipelineBtn().click();
         if (pipelineInput) {
             cy.dataCy('sp-editor-pipeline-name').type(
                 pipelineInput.pipelineName,
@@ -167,7 +164,7 @@ export class PipelineUtils {
         assetNameList?: String[],
     ) {
         // Save and start pipeline
-        cy.dataCy('sp-editor-save-pipeline').click();
+        PipelineBtns.savePipelineBtn().click();
         if (pipelineInput) {
             cy.dataCy('sp-editor-pipeline-name').type(
                 pipelineInput.pipelineName,
@@ -196,28 +193,26 @@ export class PipelineUtils {
     }
 
     public static clonePipeline(newPipelineName: string) {
-        cy.dataCy('pipeline-update-mode-clone').children().click();
+        PipelineBtns.pipelineCloneModeBtn().children().click();
         cy.dataCy('sp-editor-pipeline-name').type(newPipelineName);
     }
 
     public static updatePipeline(newPipelineName: string) {
-        cy.dataCy('pipeline-update-mode-update').children().click();
+        //PipelineBtns.pipelineCloneModeBtn().children().click();
         cy.dataCy('sp-editor-pipeline-name').type(newPipelineName);
     }
 
     public static finalizePipelineStart(assetNameList?: String[]) {
-        
cy.dataCy('sp-editor-checkbox-navigate-to-overview').children().click();
+        PipelineBtns.navigateToOverviewCheckbox().children().click();
         if (assetNameList) {
             PipelineUtils.addToAsset(assetNameList);
         }
-        cy.dataCy('sp-editor-apply').click();
+        PipelineBtns.editorApplyBtn().click();
 
         cy.dataCy('sp-pipeline-started-success', { timeout: 15000 }).should(
             'be.visible',
         );
-        cy.dataCy('sp-navigate-to-pipeline-overview', {
-            timeout: 15000,
-        }).click();
+        PipelineBtns.navigateToPipelineOverview().click();
     }
 
     public static checkAmountOfPipelinesPipeline(amount: number) {
diff --git a/ui/cypress/support/utils/user/UserBtns.ts 
b/ui/cypress/support/utils/user/UserBtns.ts
index b3cfb8525f..6aa8c87052 100644
--- a/ui/cypress/support/utils/user/UserBtns.ts
+++ b/ui/cypress/support/utils/user/UserBtns.ts
@@ -36,4 +36,26 @@ export class UserBtns {
     public static saveEditUserBtn() {
         return cy.dataCy('sp-element-edit-user-save');
     }
+
+    public static newUserBtn() {
+        return cy.dataCy('add-new-user', { timeout: 10000 });
+    }
+
+    public static activateUserBtn() {
+        return cy.dataCy('new-user-enabled');
+    }
+
+    public static deleteUserBtn(name) {
+        return cy.dataCy('user-delete-btn-' + name);
+    }
+
+    public static confirmDeleteBtn() {
+        return cy.dataCy('confirm-delete');
+    }
+    public static firstEditUserBtn() {
+        return cy.dataCy('user-edit-btn').eq(1);
+    }
+    public static serviceDeleteBtn() {
+        return cy.dataCy('service-delete-btn');
+    }
 }
diff --git 
a/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts 
b/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
index 8c26ec3f7f..6296e9bd81 100644
--- a/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
+++ b/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
@@ -25,6 +25,7 @@ import { AdapterBuilder } from 
'../../support/builder/AdapterBuilder';
 import { DashboardUtils } from '../../support/utils/DashboardUtils';
 import { DataExplorerUtils } from 
'../../support/utils/dataExplorer/DataExplorerUtils';
 import { GeneralUtils } from '../../support/utils/GeneralUtils';
+import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
 
 describe('Test Edit Adapter and Pipeline', () => {
     beforeEach('Setup Test', () => {
@@ -89,16 +90,16 @@ describe('Test Edit Adapter and Pipeline', () => {
         }).should('be.visible');
 
         GeneralUtils.openMenuForRow('Pipeline Test');
-        cy.dataCy('modify-pipeline-btn').click();
-        cy.dataCy('settings-pipeline-element-button').eq(0).click();
-        cy.dataCy('number-mapping').contains('pressure').click({ force: true 
});
-        cy.dataCy('sp-element-configuration-save').click({ force: true });
-        cy.dataCy('sp-editor-save-pipeline').click();
-        
cy.dataCy('sp-editor-checkbox-navigate-to-overview').children().click();
-        cy.dataCy('sp-editor-apply').click();
-        cy.dataCy('sp-navigate-to-pipeline-overview', {
-            timeout: 7000,
-        }).click();
+        PipelineBtns.modifyPipeline().click();
+        PipelineBtns.settingsPipelineElementBtn().eq(0).click();
+        cy.dataCy('number-mapping', { timeout: 10000 })
+            .contains('pressure')
+            .click({ force: true });
+        PipelineBtns.saveElementConfigBtn().click({ force: true });
+        PipelineBtns.savePipelineBtn().click();
+        PipelineBtns.navigateToOverviewCheckbox().children().click();
+        PipelineBtns.editorApplyBtn().click();
+        PipelineBtns.navigateToPipelineOverview().click();
 
         // Visit dashboard
         cy.wait(5000);
diff --git 
a/ui/cypress/tests/connect/editAdapterTransformationRulesAreKept.spec.ts 
b/ui/cypress/tests/connect/editAdapterTransformationRulesAreKept.spec.ts
index 764f374b56..6d8122ff07 100644
--- a/ui/cypress/tests/connect/editAdapterTransformationRulesAreKept.spec.ts
+++ b/ui/cypress/tests/connect/editAdapterTransformationRulesAreKept.spec.ts
@@ -34,25 +34,25 @@ describe('Test Adapter Transformation Rules are properly 
stored', () => {
         ConnectUtils.goToConnect();
         ConnectUtils.goToNewAdapterPage();
         ConnectUtils.selectAdapter(configuration.adapterType);
-        cy.contains('Next').click();
+        ConnectBtns.adapterSettingsNextBtn().click();
 
-        cy.dataCy('sp-event-schema-next-button').click();
+        ConnectBtns.schemaNextBtn().click();
         cy.dataCy('sp-adapter-name').type('Test Adapter');
-        cy.dataCy('connect-remove-duplicates-box').click();
+        ConnectBtns.connectRemoveDuplicateBox().click();
         cy.dataCy('connect-remove-duplicates-input').type('10000');
-        cy.dataCy('connect-reduce-event-rate-box').click();
+        ConnectBtns.connectReduceEventRate().click();
         cy.dataCy('connect-reduce-event-input').type('20000');
-        cy.dataCy('adapter-settings-start-adapter-btn').click();
+        ConnectBtns.adapterSettingsStartAdapter().click();
         ConnectUtils.closeAdapterPreview();
 
         // Edit adapter and check if given values and added property still 
provided
         ConnectBtns.openActionsMenu('Test Adapter');
         ConnectBtns.editAdapter().should('not.be.disabled');
         ConnectBtns.editAdapter().click();
-        cy.contains('Next').click();
-        cy.dataCy('sp-event-schema-next-button').click();
+        ConnectBtns.adapterSettingsNextBtn().click();
+        ConnectBtns.schemaNextBtn().click();
 
-        cy.dataCy('connect-remove-duplicates-box')
+        ConnectBtns.connectRemoveDuplicateBox()
             .find('input')
             .should('be.checked');
         cy.dataCy('connect-remove-duplicates-input').should(
@@ -60,9 +60,7 @@ describe('Test Adapter Transformation Rules are properly 
stored', () => {
             '10000',
         );
 
-        cy.dataCy('connect-reduce-event-rate-box')
-            .find('input')
-            .should('be.checked');
+        
ConnectBtns.connectReduceEventRate().find('input').should('be.checked');
         cy.dataCy('connect-reduce-event-input').should('have.value', '20000');
     });
 });
diff --git a/ui/cypress/tests/connect/editAdapterValuesAndFields.spec.ts 
b/ui/cypress/tests/connect/editAdapterValuesAndFields.spec.ts
index ff9cf46ba0..7b00e8261f 100644
--- a/ui/cypress/tests/connect/editAdapterValuesAndFields.spec.ts
+++ b/ui/cypress/tests/connect/editAdapterValuesAndFields.spec.ts
@@ -35,7 +35,7 @@ describe('Test Edit Adapter', () => {
         ConnectUtils.goToConnect();
         ConnectUtils.goToNewAdapterPage();
         ConnectUtils.selectAdapter(configuration.adapterType);
-        cy.contains('Next').click();
+        ConnectBtns.adapterSettingsNextBtn().click();
 
         // Add new property and edit field
         cy.dataCy('connect-add-static-property').click();
@@ -73,7 +73,7 @@ describe('Test Edit Adapter', () => {
         ConnectBtns.openActionsMenu('Test Adapter');
         ConnectBtns.editAdapter().should('not.be.disabled');
         ConnectBtns.editAdapter().click();
-        cy.contains('Next').click();
+        ConnectBtns.adapterSettingsNextBtn().click();
         cy.dataCy('edit-density').click();
         ConnectEventSchemaUtils.validateRuntimeName('test-density');
 
@@ -102,8 +102,8 @@ describe('Test Edit Adapter', () => {
             'include.text',
             'test-property-1',
         );
-        cy.dataCy('sp-event-schema-next-button').click();
-        cy.dataCy('store-edit-adapter').click();
+        ConnectBtns.schemaNextBtn().click();
+        ConnectBtns.storeEditAdapter().click();
         ConnectUtils.closeAdapterPreview();
 
         // Configure adapter with pressure instead of flowrate
@@ -122,8 +122,8 @@ describe('Test Edit Adapter', () => {
             'include.text',
             'test-property-1',
         );
-        cy.dataCy('sp-event-schema-next-button').click();
-        cy.dataCy('store-edit-adapter').click();
+        ConnectBtns.schemaNextBtn().click();
+        ConnectBtns.storeEditAdapter().click();
         ConnectUtils.closeAdapterPreview();
     });
 });
diff --git a/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts 
b/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
index aae4ddf7f5..27609d79a1 100644
--- a/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
+++ b/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
@@ -18,6 +18,7 @@
 
 import { PipelineUtils } from '../../support/utils/pipeline/PipelineUtils';
 import { DataExplorerUtils } from 
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { DataExplorerBtns } from 
'../../support/utils/dataExplorer/DataExplorerBtns';
 
 describe('Test Truncate data in datalake', () => {
     beforeEach('Setup Test', () => {
@@ -29,18 +30,18 @@ describe('Test Truncate data in datalake', () => {
         DataExplorerUtils.goToDatalakeConfiguration();
 
         // Check if amount of events is correct
-        cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+        DataExplorerBtns.datalakeNumberEvents()
             .should('be.visible')
             .contains('10');
 
         // Truncate data
-        cy.dataCy('datalake-truncate-btn').should('be.visible').click();
-        cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
+        DataExplorerBtns.dataLakeTruncateBtn().should('be.visible').click();
+        DataExplorerBtns.confirmDataLakeTruncateBtn()
             .should('be.visible')
             .click();
 
         // Check if amount of events is zero. The should('have.text, '0') is 
required to check for text equality
-        cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+        DataExplorerBtns.datalakeNumberEvents()
             .should('be.visible')
             .should($element => {
                 const text = $element.text().trim();
@@ -60,20 +61,17 @@ describe('Delete data in datalake', () => {
         DataExplorerUtils.goToDatalakeConfiguration();
 
         // Check if amount of events is correct
-        cy.dataCy('datalake-number-of-events', { timeout: 10000 })
+        DataExplorerBtns.datalakeNumberEvents()
             .should('be.visible')
             .contains('10');
 
         // Delete data
-        cy.dataCy('datalake-delete-btn').should('be.visible').click();
-        cy.dataCy('confirm-delete-data-btn', { timeout: 10000 })
+        DataExplorerBtns.dataLakeDeleteBtn().should('be.visible').click();
+        DataExplorerBtns.confirmDataLakeDeleteBtn()
             .should('be.visible')
             .click();
 
         // Check if amount of events is zero
-        cy.dataCy('datalake-number-of-events', { timeout: 10000 }).should(
-            'have.length',
-            0,
-        );
+        DataExplorerBtns.datalakeNumberEvents().should('have.length', 0);
     });
 });
diff --git a/ui/cypress/tests/pipeline/renamePipelineTest.spec.ts 
b/ui/cypress/tests/pipeline/renamePipelineTest.spec.ts
index 46de0f3d66..e57a295947 100644
--- a/ui/cypress/tests/pipeline/renamePipelineTest.spec.ts
+++ b/ui/cypress/tests/pipeline/renamePipelineTest.spec.ts
@@ -16,6 +16,7 @@
  *
  */
 
+import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
 import { PipelineUtils } from '../../support/utils/pipeline/PipelineUtils';
 
 describe('Test rename of running pipeline', () => {
@@ -31,7 +32,7 @@ describe('Test rename of running pipeline', () => {
 
         PipelineUtils.editPipeline('Pipeline Test');
         cy.wait(1000);
-        cy.dataCy('sp-editor-save-pipeline').click();
+        PipelineBtns.savePipelineBtn().click();
         cy.dataCy('sp-editor-pipeline-name').clear();
         PipelineUtils.updatePipeline('Renamed Pipeline');
         PipelineUtils.finalizePipelineStart();
@@ -40,7 +41,7 @@ describe('Test rename of running pipeline', () => {
         PipelineUtils.verifyPipelineName('Renamed Pipeline');
 
         PipelineUtils.editPipeline('Renamed Pipeline');
-        cy.dataCy('sp-editor-save-pipeline').click();
+        PipelineBtns.savePipelineBtn().click();
         cy.dataCy('sp-editor-pipeline-name').clear();
         PipelineUtils.clonePipeline('Cloned Renamed Pipeline');
         PipelineUtils.finalizePipelineStart();
diff --git a/ui/cypress/tests/pipeline/updatePipelineTest.smoke.spec.ts 
b/ui/cypress/tests/pipeline/updatePipelineTest.smoke.spec.ts
index 66df6816b8..d31c0d04f5 100644
--- a/ui/cypress/tests/pipeline/updatePipelineTest.smoke.spec.ts
+++ b/ui/cypress/tests/pipeline/updatePipelineTest.smoke.spec.ts
@@ -16,6 +16,7 @@
  *
  */
 
+import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
 import { PipelineUtils } from '../../support/utils/pipeline/PipelineUtils';
 
 describe('Test update of running pipeline', () => {
@@ -33,7 +34,7 @@ describe('Test update of running pipeline', () => {
 
         PipelineUtils.editPipeline(pipelineName);
         cy.wait(1000);
-        cy.dataCy('sp-editor-save-pipeline').click();
+        PipelineBtns.savePipelineBtn().click();
         PipelineUtils.clonePipeline('Pipeline Test 2');
         PipelineUtils.finalizePipelineStart();
         cy.dataCy('more-options', { timeout: 10000 }).should('have.length', 2);
diff --git 
a/ui/cypress/tests/pipelineElement/PipelineElementDocumentation.spec.ts 
b/ui/cypress/tests/pipelineElement/PipelineElementDocumentation.spec.ts
index 4387a2e5e6..420a0e84c2 100644
--- a/ui/cypress/tests/pipelineElement/PipelineElementDocumentation.spec.ts
+++ b/ui/cypress/tests/pipelineElement/PipelineElementDocumentation.spec.ts
@@ -16,6 +16,7 @@
  *
  */
 
+import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
 import { PipelineUtils } from '../../support/utils/pipeline/PipelineUtils';
 
 describe('Validate that the markdown documentation for pipeline elements 
works', () => {
@@ -25,8 +26,8 @@ describe('Validate that the markdown documentation for 
pipeline elements works',
 
     it('Perform Test', () => {
         PipelineUtils.goToPipelineEditor();
-        cy.dataCy('pipeline-element-icon-stand-row').first().click();
-        cy.dataCy('help-button-icon-stand').click();
+        PipelineBtns.pipelineIconStandRow().first().click();
+        PipelineBtns.pipelineHelpBtn().click();
         cy.dataCy('pipeline-element-documentation-markdown').should('exist');
     });
 });
diff --git 
a/ui/cypress/tests/pipelineElementConfigurationTemplate/connectConfigurationTemplate.spec.ts
 
b/ui/cypress/tests/pipelineElementConfigurationTemplate/connectConfigurationTemplate.spec.ts
index 17b55649a3..0572827001 100644
--- 
a/ui/cypress/tests/pipelineElementConfigurationTemplate/connectConfigurationTemplate.spec.ts
+++ 
b/ui/cypress/tests/pipelineElementConfigurationTemplate/connectConfigurationTemplate.spec.ts
@@ -20,6 +20,7 @@ import { ConnectUtils } from 
'../../support/utils/connect/ConnectUtils';
 import { StaticPropertyUtils } from 
'../../support/utils/userInput/StaticPropertyUtils';
 import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
 import { PipelineElementTemplateUtils } from 
'../../support/utils/PipelineElementTemplateUtils';
+import { ConnectBtns } from '../../support/utils/connect/ConnectBtns';
 
 describe('Test Edit Adapter', () => {
     beforeEach('Setup Test', () => {
@@ -47,7 +48,7 @@ describe('Test Edit Adapter', () => {
         // store adapter template
         PipelineElementTemplateUtils.addTemplate(TEMPLATE_NAME);
 
-        cy.dataCy('connect-new-adapter-cancel').click();
+        ConnectBtns.connectNewAdapterCancel().click();
 
         // Reload template configuration
         ConnectUtils.goToNewAdapterPage();
diff --git a/ui/cypress/tests/userManagement/testGroupManagement.spec.ts 
b/ui/cypress/tests/userManagement/testGroupManagement.spec.ts
index d136a0b47c..97a2302daa 100644
--- a/ui/cypress/tests/userManagement/testGroupManagement.spec.ts
+++ b/ui/cypress/tests/userManagement/testGroupManagement.spec.ts
@@ -26,6 +26,7 @@ import { PipelineBuilder } from 
'../../support/builder/PipelineBuilder';
 import { PermissionUtils } from '../../support/utils/user/PermissionUtils';
 import { NavigationUtils } from 
'../../support/utils/navigation/NavigationUtils';
 import { ConfigurationBtns } from 
'../../support/utils/configuration/ConfigurationBtns';
+import { UserBtns } from '../../support/utils/user/UserBtns';
 
 describe('Test Group Management for Pipelines', () => {
     beforeEach('Setup Test', () => {
@@ -88,12 +89,12 @@ describe('Test Group Management for Pipelines', () => {
         ConfigurationBtns.newUserGroupBtn().click();
         ConfigurationBtns.inputGroupName('User_Group');
         cy.get('input[value="ROLE_PIPELINE_ADMIN"]').check();
-        cy.dataCy('sp-element-edit-user-save').click();
+        UserBtns.saveEditUserBtn().click();
 
         // Add first user to group
-        cy.dataCy('user-edit-btn').eq(1).click();
+        UserBtns.firstEditUserBtn().click();
         cy.get('input[type="checkbox"]').eq(0).check();
-        cy.dataCy('sp-element-edit-user-save').click();
+        UserBtns.saveEditUserBtn().click();
 
         // Add user group to pipeline
         PipelineUtils.goToPipelines();
@@ -126,7 +127,7 @@ describe('Test Group Management for Pipelines', () => {
         UserUtils.deleteUser(user2);
 
         // Delete group
-        cy.dataCy('service-delete-btn').eq(1).click();
-        cy.dataCy('confirm-delete').click();
+        UserBtns.serviceDeleteBtn().eq(1).click();
+        UserBtns.confirmDeleteBtn().click();
     });
 });


Reply via email to