mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 14:49:32 +00:00
Improve flaky tests
This commit is contained in:
parent
a39e17abbe
commit
530437167e
2 changed files with 3 additions and 0 deletions
|
|
@ -291,6 +291,8 @@ class ArticleQuotedCardTest(BaseTestCase):
|
||||||
|
|
||||||
def test_quoted_card_has_cover_image(self):
|
def test_quoted_card_has_cover_image(self):
|
||||||
self.open_nitter(self.quoted_tweet)
|
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')
|
self.assert_element_visible('.quote .article-card .card-image img')
|
||||||
src = self.get_attribute('.quote .article-card .card-image img', 'src')
|
src = self.get_attribute('.quote .article-card .card-image img', 'src')
|
||||||
self.assertIn('/pic/', src)
|
self.assertIn('/pic/', src)
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ class MediaTest(BaseTestCase):
|
||||||
@parameterized.expand(gallery)
|
@parameterized.expand(gallery)
|
||||||
def test_gallery(self, tweet, rows):
|
def test_gallery(self, tweet, rows):
|
||||||
self.open_nitter(tweet)
|
self.open_nitter(tweet)
|
||||||
|
self.scroll_to(Media.container)
|
||||||
self.assert_element_visible(Media.container)
|
self.assert_element_visible(Media.container)
|
||||||
self.assert_element_visible(Media.row)
|
self.assert_element_visible(Media.row)
|
||||||
self.assert_element_visible(Media.image)
|
self.assert_element_visible(Media.image)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue