mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
refactor: use browser native lazy loading (#31814)
(cherry picked from commit 08d7c48dc7)
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -57,7 +57,11 @@ class TestHomepageSection(unittest.TestCase):
|
||||
self.assertEqual(cards[0].h5.text, "Card 1")
|
||||
self.assertEqual(cards[0].a["href"], "/card-1")
|
||||
self.assertEqual(cards[1].p.text, "Subtitle 2")
|
||||
self.assertEqual(cards[1].find(class_="website-image-lazy")["data-src"], "test.jpg")
|
||||
|
||||
img = cards[1].find(class_="card-img-top")
|
||||
|
||||
self.assertEqual(img["src"], "test.jpg")
|
||||
self.assertEqual(img["loading"], "lazy")
|
||||
|
||||
# cleanup
|
||||
frappe.db.rollback()
|
||||
|
||||
Reference in New Issue
Block a user