Closed dlabrecq closed 3 weeks ago
This failure appears to be caused because the Popper menu is being set to aria-disabled after a selection is made, causing the RTL query to not be able to find the menu options without the {hidden: true}
option being passed. This behavior started occurring with our change to Poppers default appendTo value and can be resolved by either passing that hidden
option to the RTL queries or changing the Select's appendTo
back to inline
.
Also it seems to be a strange interaction between the internals of Popper and Jest/JSDOM as I haven't been able to reproduce this in a real browser, if anyone is though please let me know.
Please describe the issue
Test fails due to
Unable to find role="option"
error, related to Select. This test worked with v5, but no longer works with v6.Are there visuals for this issue? Please provide screenshots
Error
Could you point to a branch or draft PR where this issue exists? Please provide a link to the code
Test https://github.com/dlabrecq/koku-ui/blob/pf-v6/src/routes/settings/costModels/costModel/updateRateModel.test.tsx#L300
Tested component https://github.com/dlabrecq/koku-ui/blob/pf-v6/src/routes/settings/costModels/components/rateForm/rateForm.tsx#L130
The tested component drills down to this Select https://github.com/dlabrecq/koku-ui/blob/pf-v6/src/routes/components/selectWrapper/selectWrapper.tsx#L100