GavinJoyce / ember-headlessui

https://gavinjoyce.github.io/ember-headlessui/
Other
92 stars 34 forks source link

Fix `it should add a scroll lock to the html tag` test #121

Closed bertdeblock closed 2 years ago

bertdeblock commented 2 years ago

I just checked out the project locally and this test was failing consistently for me. I'm a bit confused as to why, because it seems this doesn't happen during CI? It seems the issue is that the dialog overlay is rendered outside of the testing container which is used as the root when querying elements. Using the getDialogOverlay helper fixes this as it uses the document as the root to get the dialog overlay element. The same is done here and here.

GavinJoyce commented 2 years ago

Thanks @bertdeblock 🍻