diff --git a/tests/test_article.py b/tests/test_article.py index 652ec76..287b948 100644 --- a/tests/test_article.py +++ b/tests/test_article.py @@ -291,6 +291,8 @@ class ArticleQuotedCardTest(BaseTestCase): def test_quoted_card_has_cover_image(self): self.open_nitter(self.quoted_tweet) + # Scroll to element to trigger lazy loading + self.scroll_to('.quote .article-card .card-image img') self.assert_element_visible('.quote .article-card .card-image img') src = self.get_attribute('.quote .article-card .card-image img', 'src') self.assertIn('/pic/', src) diff --git a/tests/test_tweet_media.py b/tests/test_tweet_media.py index 65e6edb..7f81391 100644 --- a/tests/test_tweet_media.py +++ b/tests/test_tweet_media.py @@ -101,6 +101,7 @@ class MediaTest(BaseTestCase): @parameterized.expand(gallery) def test_gallery(self, tweet, rows): self.open_nitter(tweet) + self.scroll_to(Media.container) self.assert_element_visible(Media.container) self.assert_element_visible(Media.row) self.assert_element_visible(Media.image)