Exemple #1
0
    def test_button_like(self):
        toolbar = PhotoPage(
            self.driver).get_photo().toolbar().get_left_toolbar()

        old_likes_count = toolbar.get_likes_count()
        toolbar.put_like()
        new_likes_count = toolbar.get_likes_count()
        self.assertEquals(int(old_likes_count) + 1, int(new_likes_count))

        toolbar.put_unlike()
        new_likes_count = toolbar.get_likes_count()
        self.assertEquals(int(old_likes_count), int(new_likes_count))
Exemple #2
0
    def test_thumbs_like(self):
        toolbar = PhotoPage(
            self.driver).get_photo().toolbar().get_left_toolbar()

        old_likes_count = toolbar.get_likes_count()
        toolbar.put_like_thumbs()
        self.driver.refresh()
        new_likes_count = toolbar.get_likes_count()
        self.assertEquals(int(old_likes_count) + 1, int(new_likes_count))

        toolbar.put_unlike_thumbs()
        self.driver.refresh()
        new_likes_count = toolbar.get_likes_count()
        self.assertEquals(old_likes_count, new_likes_count)