summaryrefslogtreecommitdiff
path: root/tests/admin_widgets
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-13 15:07:21 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-13 15:46:56 +0200
commite07887075707d7ac9c2cba358ed1adc88412a2c2 (patch)
treed61e439544b89c92453c377b6fea7b35011e341b /tests/admin_widgets
parent4eb5e4ee4fe097986df839b11efb69b6bb9db00f (diff)
[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 in 46fe506445666d8097945f0c1e8be11cfd644b28. Backport of 18eb852874a073001cb509f64002b6d82bdc760b from master
Diffstat (limited to 'tests/admin_widgets')
-rw-r--r--tests/admin_widgets/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index 34166f986c..7241ea9554 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -880,6 +880,7 @@ class DateTimePickerSeleniumTests(AdminWidgetSeleniumTestCase):
The calendar shows the date from the input field for every locale
supported by Django.
"""
+ self.selenium.set_window_size(1024, 768)
self.admin_login(username='super', password='secret', login_url='/')
# Enter test data
@@ -1142,6 +1143,7 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
self.assertEqual(self.selenium.current_url, original_url)
def test_basic(self):
+ self.selenium.set_window_size(1024, 768)
self.school.students.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
+ self.selenium.set_window_size(1024, 768)
self.school.students.set([self.lisa, self.peter])
self.school.alumni.set([self.lisa, self.peter])