Opened 4 hours ago
Last modified 4 hours ago
#37180 new Uncategorized
Fix assertions in SelectFilter height selenium tests. — at Initial Version
| Reported by: | Varun Kasyap Pentamaraju | Owned by: | |
|---|---|---|---|
| Component: | Testing framework | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
in test_selectbox_height_collapsible_fieldset and test_selectbox_height_not_collapsible_fieldset tests in admin_views/tests.py (introduced in #33024)
these tests compare the height of the inner <select> boxes (from_box and to_box)
since, the UI was updated to use CSS Flexbox, Flexbox makes the outer containers (.selector-available and .selector-chosen) equal in height, not the inner <select> boxes.
Because the help text for the right box ("Remove toppings...") is longer than the left box ("Choose toppings..."), it can wrap into an extra line on smaller screens. When the text wraps into 3 lines, Flexbox automatically shrinks the inner <select> box to adjust. This means the inner boxes will have different heights.
The current Selenium tests are passing mostly by luck. But if the test runs in a different window size, this could fail.
We should update the test to compare the heights of the outer flex containers only.