diff options
Diffstat (limited to 'tests/admin_widgets')
| -rw-r--r-- | tests/admin_widgets/tests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index b1db728f67..a607f1fedc 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -1203,6 +1203,22 @@ class DateTimePickerSeleniumTests(AdminWidgetSeleniumTestCase): # The right month and year are displayed. self.wait_for_text("#calendarin0 caption", expected_caption) + def test_calendar_press_enter_focus_element(self): + from selenium.webdriver.common.by import By + from selenium.webdriver.common.keys import Keys + + self.admin_login(username="super", password="secret", login_url="/") + self.selenium.get( + self.live_server_url + reverse("admin:admin_widgets_member_add") + ) + icon = self.selenium.find_element(By.ID, "calendarlink0") + expected_focus_element = self.selenium.find_element( + By.CSS_SELECTOR, "div#calendarin0 table td.today a" + ) + icon.send_keys(Keys.ENTER) + focused_element = self.selenium.switch_to.active_element + self.assertEqual(expected_focus_element, focused_element) + @override_settings(TIME_ZONE="Asia/Seoul") def test_timezone_warning_message(self): from selenium.webdriver.common.by import By |
