Skip to content

Fix ISM e2e tests for OS 2.9: conditional toast dismiss and flexible column count - #2124

Merged
ruanyl merged 1 commit into
opensearch-project:2.9from
aditi-1601:fix-ism-e2e-2.9
Jul 30, 2026
Merged

Fix ISM e2e tests for OS 2.9: conditional toast dismiss and flexible column count#2124
ruanyl merged 1 commit into
opensearch-project:2.9from
aditi-1601:fix-ism-e2e-2.9

Conversation

@aditi-1601

Copy link
Copy Markdown

Description

Fixes index-management-e2e (test_e2e_ism) failures on OpenSearch 2.9

  • managed_indices_spec.js: replace unconditional toast dismiss calls with a
    conditional dismiss so the spec doesn't fail when no toast is present

  • transforms_spec.js: match the "columns hidden" link with a flexible regex instead of the hard-coded "50 columns hidden", so the
    test is resilient to the column count rendered by the UI

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…column count

Signed-off-by: Aditi Chaudhry <aditiac@amazon.com>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 Multiple PR themes

Sub-PR theme: Conditional toast dismiss in managed_indices_spec

Relevant files:

  • cypress/integration/plugins/index-management-dashboards-plugin/managed_indices_spec.js

Sub-PR theme: Flexible columns-hidden regex in transforms_spec

Relevant files:

  • cypress/integration/plugins/index-management-dashboards-plugin/transforms_spec.js

⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Anchor regex to avoid unintended matches

Using cy.contains with a regex like /\d+ columns hidden/ may match unintended
elements containing digits followed by " columns hidden" substring anywhere on the
page. Anchor the regex to ensure it matches the full expected phrase, e.g. /^\d+
columns hidden$/, to avoid flaky matches against overlapping text nodes.

cypress/integration/plugins/index-management-dashboards-plugin/transforms_spec.js [105]

-cy.contains(/\d+ columns hidden/).click({ force: true });
+cy.contains(/^\d+ columns hidden$/).click({ force: true });
Suggestion importance[1-10]: 4

__

Why: Anchoring the regex is a reasonable minor improvement for matching precision, but the original pattern is likely sufficient in this context and the impact is low.

Low

@ruanyl
ruanyl merged commit 933f0e3 into opensearch-project:2.9 Jul 30, 2026
19 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants