Opened 67 minutes ago

Last modified 17 minutes ago

#37182 assigned Cleanup/optimization

non-existent DOM properties used in skip link to content selenium test

Reported by: Varun Kasyap Pentamaraju Owned by: Varun Kasyap Pentamaraju
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

in admin_views.test_skip_link_to_content.PlaywrightTests.test_skip_link_with_RTL_language_doesnt_create_horizontal_scrolling

horizontal scroll check uses non-existent DOM properties (scrollWeight / offsetWeight) instead of scrollWidth / offsetWidth.

            is_vertical_scrolleable = self.selenium.execute_script(
                "return arguments[0].scrollHeight > arguments[0].offsetHeight;", body
            )
            is_horizontal_scrolleable = self.selenium.execute_script(
                "return arguments[0].scrollWeight > arguments[0].offsetWeight;", body
            )
            self.assertTrue(is_vertical_scrolleable)
            self.assertFalse(is_horizontal_scrolleable)

undefined > undefined is always false. so, assertFalse always passes

Change History (2)

comment:1 by Tim Graham, 49 minutes ago

Triage Stage: UnreviewedAccepted

comment:2 by Varun Kasyap Pentamaraju, 17 minutes ago

Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top