1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #36331 -- Reverted "Fixed #36055 -- Prevented overlap of object-tools buttons and page header in the admin."

This reverts commits b1324a680a and
02a5cbfe76. The former caused a regression
in admin sites that relied on the `object-tools` block being inside the
`content` block.

Thank you to Fabian Braun for the report.
This commit is contained in:
antoliny0919
2025-04-17 19:38:26 +09:00
committed by nessita
parent 1831f7733d
commit 1bc805e23b
7 changed files with 14 additions and 38 deletions

View File

@@ -125,7 +125,6 @@ from .models import (
Song,
State,
Story,
Subscriber,
SuperSecretHideout,
SuperVillain,
Telegram,
@@ -6870,24 +6869,6 @@ class SeleniumTests(AdminSeleniumTestCase):
name_input_value = name_input.get_attribute("value")
self.assertEqual(name_input_value, "Test section 1")
@screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
def test_long_object_str_on_change_view(self):
from selenium.webdriver.common.by import By
self.admin_login(
username="super", password="secret", login_url=reverse("admin:index")
)
s = Subscriber.objects.create(name="a " * 40, email="b " * 80)
self.selenium.get(
self.live_server_url
+ reverse("admin:admin_views_subscriber_change", args=(s.pk,))
)
object_tools = self.selenium.find_elements(
By.CSS_SELECTOR, "div#content ul.object-tools li"
)
self.assertGreater(len(object_tools), 0)
self.take_screenshot("not-overwrap")
@override_settings(ROOT_URLCONF="admin_views.urls")
class ReadonlyTest(AdminFieldExtractionMixin, TestCase):