Open sjwilczynski opened 1 year ago
Unfortunately the browser is the only way to assert what happens with focus correctly in general, we've generally tried to avoid asserting anything focus related in JSDOM. Tabster and other focus utilities have a habit of doing things asynchronously with timeouts in some cases, so it's not an easy proposition to test focus there
Hey folks,
I am using Fluent 9 Popover and wanted to verify that correct element is focused open opening the Popover. For the component I created, I can visually verify in Storybook that correct element is focused. However, when I want to make such assertion in unit tests, it seems to no longer be the case. Can tabster functionality be somehow verified in
jest
andjsdom
environment? Or the only way to verify is to have e2e tests, rendering browser window?