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

dominikriemer 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 a52aa06711 fix: Flaky edit adapter persistence test (#4606)
a52aa06711 is described below

commit a52aa0671154ede27c801048da4073726a968f33
Author: Dominik Riemer <[email protected]>
AuthorDate: Mon Jun 22 21:37:45 2026 +0200

    fix: Flaky edit adapter persistence test (#4606)
---
 ui/cypress/support/utils/chart/ChartBtns.ts        | 16 +++++++++++-----
 ui/cypress/support/utils/chart/ChartUtils.ts       | 22 +++++++++++++++-------
 ui/cypress/tests/connect/editAdapter.smoke.spec.ts |  4 +---
 .../datalake-configuration.component.html          |  2 +-
 4 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/ui/cypress/support/utils/chart/ChartBtns.ts 
b/ui/cypress/support/utils/chart/ChartBtns.ts
index 0d29bd966d..8e9d43cdf7 100644
--- a/ui/cypress/support/utils/chart/ChartBtns.ts
+++ b/ui/cypress/support/utils/chart/ChartBtns.ts
@@ -347,17 +347,23 @@ export class ChartBtns {
     }
 
     public static datalakeNumberEvents() {
-        return cy.dataCy('datalake-number-of-events', { timeout: 10000 });
+        return cy.dataCy('datalake-number-of-events', { timeout: 30000 });
     }
 
     public static datalakeTotalCountBtn() {
         return cy.dataCy('datalake-total-count-button', { timeout: 10000 });
     }
 
-    public static datalakeNumberOfEventsSpinner() {
-        return cy.dataCy('datalake-number-of-events-spinner', {
-            timeout: 30000,
-        });
+    public static datalakeTotalCountValue() {
+        return cy.dataCy('datalake-total-count-value', { timeout: 30000 });
+    }
+
+    public static datalakeTotalCountControl() {
+        return cy.get(
+            '[data-cy="datalake-total-count-button"], ' +
+                '[data-cy="datalake-total-count-value"]',
+            { timeout: 30000 },
+        );
     }
 
     public static dashboardAssetCheckboxBtn() {
diff --git a/ui/cypress/support/utils/chart/ChartUtils.ts 
b/ui/cypress/support/utils/chart/ChartUtils.ts
index 8a103127bc..e3cf9567b7 100644
--- a/ui/cypress/support/utils/chart/ChartUtils.ts
+++ b/ui/cypress/support/utils/chart/ChartUtils.ts
@@ -805,14 +805,22 @@ export class ChartUtils {
         return currentDate;
     }
 
-    public static getDatalakeNumberOfEvents(): Cypress.Chainable<number> {
-        ChartBtns.datalakeTotalCountBtn().should('be.visible').click();
-        ChartBtns.datalakeTotalCountBtn().should('not.exist');
-        ChartBtns.datalakeNumberOfEventsSpinner().should('not.exist');
-
-        return cy
-            .dataCy('datalake-number-of-events', { timeout: 10000 })
+    public static getDatalakeNumberOfEvents(
+        greaterThan?: number,
+    ): Cypress.Chainable<number> {
+        return ChartBtns.datalakeTotalCountControl()
+            .should('be.visible')
+            .click()
+            .then(() => ChartBtns.datalakeTotalCountValue())
             .should('be.visible')
+            .should($value => {
+                const count = Number($value.text().replaceAll(',', '').trim());
+
+                expect(Number.isNaN(count)).to.equal(false);
+                if (greaterThan !== undefined) {
+                    expect(count).to.be.greaterThan(greaterThan);
+                }
+            })
             .invoke('text')
             .then(text => Number(text.replaceAll(',', '').trim()));
     }
diff --git a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts 
b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
index d7e7977365..19618503ff 100644
--- a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
+++ b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
@@ -115,9 +115,7 @@ describe('Test Edit Adapter', () => {
             cy.wait(3000);
             ChartUtils.goToDatalakeConfiguration();
 
-            ChartUtils.getDatalakeNumberOfEvents().then(newValue => {
-                expect(newValue).to.be.greaterThan(initialValue);
-            });
+            ChartUtils.getDatalakeNumberOfEvents(initialValue);
         });
     });
 
diff --git 
a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html
 
b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html
index 72c6816298..3b3e882896 100644
--- 
a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html
+++ 
b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html
@@ -143,7 +143,7 @@
                                     <sp-label
                                         tone="neutral"
                                         class="cursor-pointer"
-                                        data-cy="datalake-total-count-button"
+                                        data-cy="datalake-total-count-value"
                                         minWidth="100px"
                                         [labelText]="
                                             configurationEntry.eventsTotal

Reply via email to