mirror of https://github.com/django/django.git
[3.1.x] Fixed #31576 -- Fixed selenium tests with headless mode.
Horizontal scrollbar doesn't appear with the headless mode on small windows, that's why window.scrollTo() is not an option for these tests. Tests changed after adding a navigation sidebar in46fe506445
. Backport of18eb852874
from master
This commit is contained in:
parent
4eb5e4ee4f
commit
e078870757
|
@ -880,6 +880,7 @@ class DateTimePickerSeleniumTests(AdminWidgetSeleniumTestCase):
|
||||||
The calendar shows the date from the input field for every locale
|
The calendar shows the date from the input field for every locale
|
||||||
supported by Django.
|
supported by Django.
|
||||||
"""
|
"""
|
||||||
|
self.selenium.set_window_size(1024, 768)
|
||||||
self.admin_login(username='super', password='secret', login_url='/')
|
self.admin_login(username='super', password='secret', login_url='/')
|
||||||
|
|
||||||
# Enter test data
|
# Enter test data
|
||||||
|
@ -1142,6 +1143,7 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
|
||||||
self.assertEqual(self.selenium.current_url, original_url)
|
self.assertEqual(self.selenium.current_url, original_url)
|
||||||
|
|
||||||
def test_basic(self):
|
def test_basic(self):
|
||||||
|
self.selenium.set_window_size(1024, 768)
|
||||||
self.school.students.set([self.lisa, self.peter])
|
self.school.students.set([self.lisa, self.peter])
|
||||||
self.school.alumni.set([self.lisa, self.peter])
|
self.school.alumni.set([self.lisa, self.peter])
|
||||||
|
|
||||||
|
@ -1166,6 +1168,7 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
|
||||||
"""
|
"""
|
||||||
from selenium.webdriver.common.keys import Keys
|
from selenium.webdriver.common.keys import Keys
|
||||||
|
|
||||||
|
self.selenium.set_window_size(1024, 768)
|
||||||
self.school.students.set([self.lisa, self.peter])
|
self.school.students.set([self.lisa, self.peter])
|
||||||
self.school.alumni.set([self.lisa, self.peter])
|
self.school.alumni.set([self.lisa, self.peter])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue