#37182: non-existent DOM properties used in skip link to content selenium test
-------------------------------------+-------------------------------------
Reporter: Varun | Owner: Varun Kasyap
Kasyap Pentamaraju | Pentamaraju
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: dev
contrib.admin |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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
--
Ticket URL: <
https://code.djangoproject.com/ticket/37182>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.