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 0f2de4cc86 fix: flaky cypress chart test (#5183)
0f2de4cc86 is described below
commit 0f2de4cc865b4c36aa4c43d33155e6bbd8127f6e
Author: Dominik Riemer <[email protected]>
AuthorDate: Mon Nov 2 22:02:20 2026 +0100
fix: flaky cypress chart test (#5183)
---
ui/cypress/support/utils/chart/ChartUtils.ts | 31 +++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/ui/cypress/support/utils/chart/ChartUtils.ts
b/ui/cypress/support/utils/chart/ChartUtils.ts
index 13e2477e69..761acb039c 100644
--- a/ui/cypress/support/utils/chart/ChartUtils.ts
+++ b/ui/cypress/support/utils/chart/ChartUtils.ts
@@ -631,19 +631,36 @@ export class ChartUtils {
public static validateFilterOptions(
expectedFilterOptions: ('=' | '<' | '<=' | '>=' | '>' | '!=')[],
) {
- cy.dataCy('design-panel-data-settings-filter-operator')
- .click()
- .dataCy('operator-', {}, true)
- .should('have.length', expectedFilterOptions.length);
+ // Selecting an operator updates the table before its closing animation
+ // necessarily finishes. Wait for the old panel before reopening it.
+ cy.dataCy('operator-', {}, true).should('not.exist');
+ cy.dataCy('design-panel-data-settings-filter-operator').click();
+ cy.dataCy('design-panel-data-settings-filter-operator').should(
+ 'have.attr',
+ 'aria-expanded',
+ 'true',
+ );
+ cy.dataCy('operator-', {}, true).should(
+ 'have.length',
+ expectedFilterOptions.length,
+ );
expectedFilterOptions.forEach(option => {
const escapedOption = option.replace(/([=<>!])/g, '\\$1');
cy.dataCy('operator-' + escapedOption).should('be.visible');
});
- cy.dataCy('design-panel-data-settings-filter-operator').click({
- force: true,
- });
+ // Reselect the current option to close the panel without changing the
filter.
+ cy.dataCy('operator-', {}, true)
+ .filter('[aria-selected="true"]')
+ .should('have.length', 1)
+ .click();
+ cy.dataCy('design-panel-data-settings-filter-operator').should(
+ 'have.attr',
+ 'aria-expanded',
+ 'false',
+ );
+ cy.dataCy('operator-', {}, true).should('not.exist');
}
public static validateAutoCompleteOptions(options: string[]) {