summaryrefslogtreecommitdiff
path: root/tests/admin_inlines
diff options
context:
space:
mode:
authorAntoliny0919 <antoliny0919@gmail.com>2026-02-10 18:56:43 +0900
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-28 09:05:37 -0500
commit21664867b60a49c25cf93191a81f335a5eafca53 (patch)
tree2b8da631f58fb3c3a4b1ad6500e129c16918d488 /tests/admin_inlines
parentb415cef5d21cd5beac212a833f9f0b7727899f64 (diff)
Fixed #36914 -- Fixed background-color to also apply to select options in TabularInline.
Diffstat (limited to 'tests/admin_inlines')
-rw-r--r--tests/admin_inlines/tests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 50b3a7baba..eda7c91310 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -2572,3 +2572,19 @@ class SeleniumTests(AdminSeleniumTestCase):
m2m_widget = self.selenium.find_element(By.CSS_SELECTOR, "div.selector")
self.assertTrue(m2m_widget.is_displayed())
self.take_screenshot("tabular")
+
+ @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
+ def test_tabular_inline_m2m_widget_option_bg(self):
+ from selenium.webdriver.common.by import By
+
+ Person.objects.create(firstname="Lee")
+ self.admin_login(username="super", password="secret")
+ self.selenium.get(
+ self.live_server_url + reverse("admin:admin_inlines_courseproxy2_add")
+ )
+ selector = self.selenium.find_element(By.CSS_SELECTOR, "div.selector")
+ options = selector.find_elements(By.CSS_SELECTOR, "select option")
+ self.assertGreater(len(options), 0)
+ options[0].click()
+ selector.find_element(By.CSS_SELECTOR, "p.selector-filter input").click()
+ self.take_screenshot("focus_out")