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.
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 thedocument
as the root to get the dialog overlay element. The same is done here and here.