MCPcopy
hub / github.com/django/django / test_pagination_layout

Method test_pagination_layout

tests/admin_views/tests.py:7556–7572  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7554
7555 @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
7556 def test_pagination_layout(self):
7557 from selenium.webdriver.common.by import By
7558
7559 self.admin_login(
7560 username="super", password="secret", login_url=reverse("admin:index")
7561 )
7562 objects = [UnorderedObject(name=f"obj-{i}") for i in range(1, 23)]
7563 UnorderedObject.objects.bulk_create(objects)
7564 self.selenium.get(
7565 self.live_server_url
7566 + reverse("admin:admin_views_unorderedobject_changelist")
7567 )
7568 pages = self.selenium.find_elements(By.CSS_SELECTOR, "nav.paginator ul li")
7569 self.assertGreater(len(pages), 1)
7570 show_all = self.selenium.find_element(By.CSS_SELECTOR, "a.showall")
7571 self.assertTrue(show_all.is_displayed())
7572 self.take_screenshot("pagination")
7573
7574 @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
7575 def test_changelist_filter_sidebar_with_long_verbose_fields(self):

Callers

nothing calls this directly

Calls 6

reverseFunction · 0.90
admin_loginMethod · 0.80
bulk_createMethod · 0.80
take_screenshotMethod · 0.80
UnorderedObjectClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected