Skip to content

test: fix flaky test for modal wrapper#22289

Merged
devadula-nandan merged 4 commits into
carbon-design-system:mainfrom
devadula-nandan:fix/modal-wrapper-flaky-test
May 19, 2026
Merged

test: fix flaky test for modal wrapper#22289
devadula-nandan merged 4 commits into
carbon-design-system:mainfrom
devadula-nandan:fix/modal-wrapper-flaky-test

Conversation

@devadula-nandan

@devadula-nandan devadula-nandan commented May 19, 2026

Copy link
Copy Markdown
Contributor

Closes N/A

fixes flaky test in ci

Changelog

Changed

  • updated flaky test in ModalWrapper

Testing / Reviewing

the ci test must pass now
try to re-run the test to check for flakiness

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@devadula-nandan devadula-nandan marked this pull request as ready for review May 19, 2026 10:52
@devadula-nandan devadula-nandan requested a review from a team as a code owner May 19, 2026 10:52
@netlify

netlify Bot commented May 19, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 90d89b2
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6a0c8ef20ffe250008502955
😎 Deploy Preview https://deploy-preview-22289--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 19, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 90d89b2
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6a0c8ef2e81a390008e4e481
😎 Deploy Preview https://deploy-preview-22289--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 19, 2026

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 90d89b2
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6a0c8ef2f360e50008c8a759
😎 Deploy Preview https://deploy-preview-22289--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (7854d9c) to head (90d89b2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22289      +/-   ##
==========================================
- Coverage   95.51%   95.50%   -0.01%     
==========================================
  Files         582      582              
  Lines       50409    50409              
  Branches     6733     6786      +53     
==========================================
- Hits        48147    48145       -2     
- Misses       2130     2132       +2     
  Partials      132      132              
Flag Coverage Δ
main-packages 89.24% <ø> (ø)
web-components 98.06% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maradwan26 maradwan26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamalston adamalston left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intermittency appears to be addressed. However, I think this test is invalid as written. triggerBtn is never clicked, and ModalWrapper ignores the incoming open prop in favor of isOpen. As a result, the test can pass without verifying that the modal was opened or that focus was restored after close.

@devadula-nandan devadula-nandan enabled auto-merge May 19, 2026 16:26
@devadula-nandan devadula-nandan added this pull request to the merge queue May 19, 2026
Merged via the queue into carbon-design-system:main with commit 3a4f978 May 19, 2026
40 checks passed
@devadula-nandan devadula-nandan deleted the fix/modal-wrapper-flaky-test branch May 19, 2026 17:04
@carbon-automation

Copy link
Copy Markdown
Contributor

Hey there! v11.108.0 was just released that references this issue/PR.

@adamalston

Copy link
Copy Markdown
Contributor

Hi @devadula-nandan, I see a 👍 on #22289 (review). Were you planning to make changes based on that feedback? If not, I can take a look at the test and determine whether it should be updated or deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants