Opened 87 minutes ago

Last modified 83 minutes ago

#37180 new Uncategorized

Fix assertions in SelectFilter height selenium tests.

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 (last modified by Varun Kasyap Pentamaraju)

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.

as shown in attached screenshot:
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, it could fail.

We should update the test to compare the heights of the outer flex containers only.

Attachments (1)

ss.png (33.6 KB ) - added by Varun Kasyap Pentamaraju 87 minutes ago.

Download all attachments as: .zip

Change History (2)

by Varun Kasyap Pentamaraju, 87 minutes ago

Attachment: ss.png added

comment:1 by Varun Kasyap Pentamaraju, 83 minutes ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top