Esempio n. 1
0
 def test_valid_login(self):
     driver = Driver()
     Welcome = WelcomePage(driver.driver)
     Login = LoginPage(driver.driver)
     Swipe = SwipePage(driver.driver)
     rand = randrange(len(list_correct_username_pass))
     Welcome.clickLogin()
     Login.testLogin(list_correct_username_pass[rand][0],
                     list_correct_username_pass[rand][1])
     assert Swipe.successlogin() == True
     driver.tearDown()
Esempio n. 2
0
 def test_undo_verification(self):
     driver = Driver()
     Swipe = SwipePage(driver.driver)
     user1 = Swipe.check_name_age()
     Swipe.swipe_right()
     Swipe.undo()
     user2 = Swipe.check_name_age()
     assert (user1 == user2)
Esempio n. 3
0
 def test_swipe_left(self):
     driver = Driver()
     Swipe = SwipePage(driver.driver)
     user1 = Swipe.check_name_age()
     Swipe.swipe_left()
     user2 = Swipe.check_name_age()
     assert (user1 != user2)
     del driver
Esempio n. 4
0
    def test_filter_location(self):
        driver = Driver()
        Swipe = SwipePage(driver.driver)
        Filter = FilterPage(driver.driver)
        Location = LocationPage(driver.driver)

        Swipe.gotofilter()
        Filter.filter()
        try:
            Filter.taplocation()
            Location.writelocation("Berlin")
            Location.chooselocation("Berlin")
            Filter.save()
            Swipe.filtersaved()
            Swipe.scroll_down_to_location()
            location = Swipe.location_text().split(sep=",")[0]

            if location == "Berlin":
                print("Yohoo")
            del driver
        except:
            print("user is NON PRIME")
Esempio n. 5
0
    def test_gift_from_card_romantic_kiss(self):
        driver = Driver()
        Swipe = SwipePage(driver.driver)
        Gift = GiftPage(driver.driver)
        Menu = MenuPage(driver.driver)
        Profile = MyprofilePage(driver.driver)
        Chat = ChatPage(driver.driver)

        Swipe.scroll_down_to_gift_card()
        Swipe.tap_on_giftcard()
        Gift.choose_gift_category_romantic()
        creditstart = Gift.gift_credits_number()
        Gift.choose_romantic_gift()
        Gift.send_gift()
        Chat.chat_text()
        Chat.backfromchat()
        Menu.go_to_Me()
        creditend = Profile.check_credits()
        assert creditstart is not creditend == True
Esempio n. 6
0
    def test_gender_check_Women(self):
        driver = Driver()
        callapi = user_API()
        Swipe = SwipePage(driver.driver)
        Filter = FilterPage(driver.driver)
        Swipe.gotofilter()
        Filter.filter()
        Filter.tapwomen()
        Filter.save()
        try:
            Swipe.filtersaved()
            Swipe.scroll_down_to_block_or_report()
            Swipe.report_abuse()
            user_id = Swipe.find_ID()
            print(user_id)
            resp = callapi.get_users_gender("118304", user_id[1:])
            print(resp)
            assert resp == "Female"

        except:
            print("You've seen everyone")