Example #1
0
 def test_card_no_thumb(self, tweet, title, description, destination):
     self.open_nitter(tweet)
     c = Card(Conversation.main + " ")
     self.assert_text(title, c.title)
     self.assert_text(destination, c.destination)
     if len(description) > 0:
         self.assert_text(description, c.description)
Example #2
0
 def test_card_promo(self, tweet, title, description, destination):
     self.open_nitter(tweet)
     card = Card(Conversation.main + " ")
     self.assert_text(title, card.title)
     self.assert_text(destination, card.destination)
     self.assert_element_visible('.video-overlay')
     if len(description) > 0:
         self.assert_text(description, card.description)
Example #3
0
 def test_card_playable(self, tweet, title, description, destination):
     self.open_nitter(tweet)
     c = Card(Conversation.main + " ")
     self.assert_text(title, c.title)
     self.assert_text(destination, c.destination)
     self.assertIn('_img', self.get_image_url(c.image + ' img'))
     self.assert_element_visible('.card-overlay')
     if len(description) > 0:
         self.assert_text(description, c.description)
Example #4
0
 def test_card(self, tweet, title, description, destination, large):
     self.open_nitter(tweet)
     c = Card(Conversation.main + " ")
     self.assert_text(title, c.title)
     self.assert_text(destination, c.destination)
     self.assertIn('_img', self.get_image_url(c.image + ' img'))
     if len(description) > 0:
         self.assert_text(description, c.description)
     if large:
         self.assert_element_visible('.card.large')
     else:
         self.assert_element_not_visible('.card.large')