Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Dialog sometimes remains hidden in jest+RTL tests #33897

Open
2 tasks done
alice-ep opened this issue Feb 25, 2025 · 3 comments
Open
2 tasks done

[Bug]: Dialog sometimes remains hidden in jest+RTL tests #33897

alice-ep opened this issue Feb 25, 2025 · 3 comments

Comments

@alice-ep
Copy link
Contributor

Component

Dialog

Package version

9.59.0

React version

17.0.2 (though reproduced with 18+ as well)

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 Intel(R) Xeon(R) W-11855M CPU @ 3.20GHz
    Memory: 32.08 GB / 63.71 GB
  Browsers:
    Edge: Chromium (130.0.2849.46)
    Internet Explorer: 11.0.26100.1882

Current Behavior

Tests of components that use a dialog intermittently fail in our CI pipelines and locally. Local runs are easy to reproduce by running the test multiple times. It seems like the dialog sometimes stays hidden after being triggered and thus RTL can't find it with get/findByRole

This started happening after we upgraded to the latest react-components packages, as well as in a separate branch that tried to install the calendar compat package which caused an upgrade to fluent's latest tabster package (9.24) - which I suspect might be guilty of the regression

Expected Behavior

Not fail :)

Reproduction

https://codesandbox.io/p/devbox/romantic-wiles-forked-f4h4zl

Steps to reproduce

Run the test (note that it repeats 10 times) - at least one of the 10 runs will fail with it being unable to find either the dialog or the input inside it

Are you reporting an Accessibility issue?

None

Suggested severity

High - No workaround

Products/sites affected

Internal Microsoft product

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@alice-ep
Copy link
Contributor Author

The workaround technically is to stay with a lower version of Fluent, but obviously that's not a long term solution :) We'll rollback the update for now so our CI pipelines aren't constantly.

@Wezea
Copy link

Wezea commented Feb 28, 2025

I can confirm this for version 9.60.0 and a vitest setup. Tests including the Dialog failed randomly. Have to pin version 9.58.2 which works for me.

@alice-ep
Copy link
Contributor Author

alice-ep commented Mar 4, 2025

Hiya, any updates about this?

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

No branches or pull requests

3 participants