Closed HussainTaj-arbisoft closed 1 year ago
Can we add a playwright test as part of this fix?
Can we add a playwright test as part of this fix?
Do you mean specifically for the layout? Yes, we can.
We already have a test to check if the toggle works. We can add an additional test to ensure interacting with inner elements does not change the menu's position on the page.
I will need to work on this as a part of https://github.com/mitodl/ocw-hugo-themes/issues/1220 because it makes changes to the topics list. Having this issue will hinder the testing of https://github.com/mitodl/ocw-hugo-themes/issues/1220.
In the desktop view, toggling topics close causes the layout to change.
Expected Behavior
Only the topic is collapsed.
Current Behavior
The topic is collapsed but the layout also shifts.
Steps to Reproduce
Possible Solution
We recently switched the course-info menu from a manual toggle to Bootstrap's collapsible element. The nested collapsible might be affecting the menu position. The menu position is controlled by JS, by fetching collapse events. We might need to apply some filtering on the handlers.