Skip to content

fix ism e2e: dismissToast and failOnStatusCode for managed service - #2103

Merged
wanglam merged 1 commit into
opensearch-project:2.11from
aditi-1601:fix-ism-e2e-2.11
Jul 27, 2026
Merged

fix ism e2e: dismissToast and failOnStatusCode for managed service#2103
wanglam merged 1 commit into
opensearch-project:2.11from
aditi-1601:fix-ism-e2e-2.11

Conversation

@aditi-1601

@aditi-1601 aditi-1601 commented Jul 20, 2026

Copy link
Copy Markdown

Description

Fix ISM E2E Cypress tests. Toast notifications from ISM job interval/jitter updates block UI interactions in managed_indices_spec.js, causing subsequent tests to fail when trying to click elements behind the toast.

###Testing
Ran managed_indices_spec.js locally against OpenSearch 2.11.0 with ISM plugin:

Managed indices
can have policies removed
✓ successfully (17490ms)
can have policies retried
✓ successfully (33716ms)
can edit rollover_alias
✓ successfully (5942ms)
can change policies
✓ successfully (16885ms)
can manage data stream indices
✓ successfully (8927ms)

5 passing (1m)

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.

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
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Dismiss all visible toasts, not just one

When multiple toasts are present, only the first close button is clicked, leaving
others visible which can obscure subsequent UI interactions. Iterate over all
matched close buttons to dismiss every toast.

cypress/utils/plugins/index-management-dashboards-plugin/commands.js [175-181]

 Cypress.Commands.add('dismissToast', () => {
   cy.get('body').then(($body) => {
-    if ($body.find(`[data-test-subj="toastCloseButton"]`).length) {
-      cy.get(`[data-test-subj="toastCloseButton"]`).click({ force: true });
+    const buttons = $body.find(`[data-test-subj="toastCloseButton"]`);
+    if (buttons.length) {
+      cy.get(`[data-test-subj="toastCloseButton"]`).each(($el) => {
+        cy.wrap($el).click({ force: true });
+      });
     }
   });
 });
Suggestion importance[1-10]: 5

__

Why: Iterating over all toast close buttons is a reasonable improvement to ensure no lingering toasts obscure UI interactions, though the impact is minor since the original code already conditionally handles the toast presence.

Low

@wanglam
wanglam merged commit e5b54a8 into opensearch-project:2.11 Jul 27, 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.

3 participants