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 cf05bafbcd fix: Make asset filter and edit adapter tests more robust
(#4578)
cf05bafbcd is described below
commit cf05bafbcde0452fa179fd220ff39c3ec82b6fa8
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Jun 16 11:44:19 2026 +0200
fix: Make asset filter and edit adapter tests more robust (#4578)
---
ui/cypress/support/utils/connect/ConnectUtils.ts | 18 ++++++++++++++++--
ui/cypress/support/utils/filter/FilterUtils.ts | 15 ++++++++++-----
ui/cypress/tests/connect/editAdapter.smoke.spec.ts | 11 ++++-------
3 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts
b/ui/cypress/support/utils/connect/ConnectUtils.ts
index 816cd78387..96f6a51fef 100644
--- a/ui/cypress/support/utils/connect/ConnectUtils.ts
+++ b/ui/cypress/support/utils/connect/ConnectUtils.ts
@@ -206,12 +206,23 @@ export class ConnectUtils {
}
public static finishEventSchemaConfiguration() {
- ConnectBtns.configureSchemaNextBtn().click();
+ ConnectBtns.configureSchemaNextBtn().should('not.be.disabled').click();
}
public static finishConfigureFieldsConfiguration() {
ConnectUtils.eventSchemaWithFieldsShouldBeVisible();
- ConnectBtns.configureFieldsNextBtn().click();
+ ConnectBtns.configureFieldsNextBtn().should('not.be.disabled').click();
+ }
+
+ public static refreshEventSchema() {
+ ConnectBtns.refreshSchemaBtn().click();
+ ConnectBtns.configureFieldsNextBtn().should('not.be.disabled');
+ }
+
+ public static stopAdapterAndWaitForStateTransition() {
+ ConnectBtns.stopAdapter().should('be.visible').click();
+ ConnectBtns.startAdapter().should('be.visible');
+ ConnectBtns.adapterOperationInProgressSpinner().should('not.exist');
}
public static eventSchemaWithFieldsShouldBeVisible() {
@@ -341,6 +352,9 @@ export class ConnectUtils {
public static closeAdapterPreview() {
cy.dataCy('close-adapter-started-dialog-button').click();
+ cy.dataCy('all-adapters-table', { timeout: 10000 }).should(
+ 'be.visible',
+ );
}
public static deleteAdapter(adapterName: string) {
diff --git a/ui/cypress/support/utils/filter/FilterUtils.ts
b/ui/cypress/support/utils/filter/FilterUtils.ts
index 8b3ddf4fc6..68509c1751 100644
--- a/ui/cypress/support/utils/filter/FilterUtils.ts
+++ b/ui/cypress/support/utils/filter/FilterUtils.ts
@@ -19,8 +19,13 @@
import { FilterBtns } from './FilterBtns';
export class FilterUtils {
+ private static openFilterMenu() {
+ FilterBtns.filterBtn().should('be.enabled').click();
+ FilterBtns.applyFiltersBtn().should('be.visible');
+ }
+
public static clearFilter() {
- FilterBtns.filterBtn().click();
+ this.openFilterMenu();
FilterBtns.resetFiltersBtn().click();
}
@@ -41,7 +46,7 @@ export class FilterUtils {
}
public static filterAssets(assetNames: string[]) {
- FilterBtns.filterBtn().click();
+ this.openFilterMenu();
FilterBtns.filtersDeselectAssets().click();
FilterBtns.filtersAssetSelect().click();
assetNames.forEach(assetName => {
@@ -54,7 +59,7 @@ export class FilterUtils {
}
public static filterSites(siteNames: string[]) {
- FilterBtns.filterBtn().click();
+ this.openFilterMenu();
FilterBtns.filtersDeselectSites().click();
FilterBtns.filtersSitesSelect().click();
@@ -68,7 +73,7 @@ export class FilterUtils {
}
public static filterLabels(siteNames: string[]) {
- FilterBtns.filterBtn().click();
+ this.openFilterMenu();
FilterBtns.filtersDeselectLabels().click();
FilterBtns.filtersLabelsSelect().click();
@@ -82,7 +87,7 @@ export class FilterUtils {
}
public static filterTypes(typeNames: string[]) {
- FilterBtns.filterBtn().click();
+ this.openFilterMenu();
FilterBtns.filtersDeselectTypes().click();
FilterBtns.filtersTypesSelect().click();
diff --git a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
index d63b15541b..0a06983852 100644
--- a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
+++ b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
@@ -38,10 +38,9 @@ describe('Test Edit Adapter', () => {
ConnectUtils.goToConnect();
// stop adapter
- ConnectBtns.stopAdapter().click();
+ ConnectUtils.stopAdapterAndWaitForStateTransition();
// click edit adapter
- ConnectBtns.adapterOperationInProgressSpinner().should('not.exist');
ConnectBtns.openActionsMenu('simulator');
ConnectBtns.editAdapter().should('not.be.disabled');
ConnectBtns.editAdapter().click();
@@ -65,8 +64,7 @@ describe('Test Edit Adapter', () => {
SharedUtils.confirmDialogVisible();
SharedBtns.confirmDialogConfirmBtn().click();
- cy.wait(1000);
- ConnectBtns.refreshSchemaBtn().click();
+ ConnectUtils.refreshEventSchema();
ConnectUtils.finishConfigureFieldsConfiguration();
ConnectBtns.adapterNameInput().clear().type(newAdapterName);
@@ -91,7 +89,7 @@ describe('Test Edit Adapter', () => {
ConnectUtils.goToConnect();
// stop adapter and edit adapter
- ConnectBtns.stopAdapter().click();
+ ConnectUtils.stopAdapterAndWaitForStateTransition();
ConnectBtns.openActionsMenu('simulator');
ConnectBtns.editAdapter().click();
@@ -103,9 +101,8 @@ describe('Test Edit Adapter', () => {
' out.collect(event);\n',
);
ConnectBtns.configureSchemaRunScriptBtn().click();
- cy.wait(1000);
- ConnectBtns.configureSchemaNextBtn().click();
+ ConnectUtils.finishEventSchemaConfiguration();
SharedUtils.confirmDialogVisible();
SharedBtns.confirmDialogConfirmBtn().click();
ConnectEventSchemaUtils.markPropertyAsTimestamp('timestamp');