#37180: Fix assertions in SelectFilter height selenium tests.
-------------------------------------+-------------------------------------
Reporter: Varun Kasyap | Type:
Pentamaraju | Uncategorized
Status: new | Component: Testing
| framework
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37180>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.