Exemple #1
0
    def test_changing_password(self):
        # Logs into existing testing account
        LoginWith().user(account_name, account_pw, driver)
        log("Logged In")
        #Changes passwrord

        m.more_button().click()
        driver.scroll(m.friends(), m.back_button())
        m.change_password().click()
        m.enter_old_password().click()
        m.enter_old_password().send_keys(account_pw)
        m.enter_new_password().click()
        m.enter_new_password().send_keys(account_new_pw)
        m.confirm_new_password().click()
        m.confirm_new_password().send_keys(account_new_pw)
        m.change_password_ok_button().click()

        #Resets Password
        m.change_password().click()
        m.enter_old_password().send_keys(account_new_pw)
        m.enter_new_password().click()
        m.enter_new_password().send_keys(account_pw)
        m.confirm_new_password().click()
        m.confirm_new_password().send_keys(account_pw)
        m.change_password_ok_button().click()
        log("Password reset")
Exemple #2
0
    def test_account_deleting(self):
        log("Deleting")
        sleep(2)
        m.more_button().click()
        driver.scroll(m.friends(), m.back_button())
        m.delete_account().click()
        m.confirm().click()
        log("Account Deleted")

        try:
            if LoginWith().user(account_name, account_pw, driver):
                ("Logged into deleted account")
        except Exception:
            log("Can not login into deleted account")

        #Recreating the account

        s.pick_username().send_keys(account_name)
        s.sign_up_OK(5).click()
        s.create_password().send_keys(account_pw)
        s.confirm_password().send_keys(account_pw)
        s.password_OK().click()
        s.birthday().click(), sleep(2)

        log("Entering birthday")
        ta(driver).long_press(x=s.date().location['x'],
                              y=s.date().location['y'],
                              duration=3000).release().perform()
        s.birthday_done().click()
        s.birthday_OK().click()
        log("Entering email")
        s.email().send_keys(account_email)
        s.email_OK().click()
        s.OK_button().click()
Exemple #3
0
    def test_dust_from_dustRoom(self):
        # Logs into existing testing account
        LoginWith().user(account_name, account_pw, driver)
        log("Logged In")
        #Changes passwrord

        h.action_menu().click()
        h.action_menu_dust().click()
        h.action_menu()
Exemple #4
0
 def check_reblast_count(self):
     LoginWith().user(account03, password03, driver)
     try:
         if h.name("24", 10):
             log("Blast count correct")
             h.blast_more_button().click()
             log("Deleting blasts")
             h.blast_more_delete().click()
     except Exception:
         log("Blast count incorrect", "Warning")
Exemple #5
0
    def test_opening_text_blast(self):
        # Login as account02
        LoginWith().user(account02, password02, driver)

        # Opens text blast with +username, URL, and location
        log("Opening text blast and checking +username, URL, and location")
        h.name(account01).click(), sleep(2)
        h.swipe_view_location().click(), sleep(3),
        driver.press_keycode(4), sleep(2)
        ta(driver).press(x=sw * .17,
                         y=sh * .23).release().perform()  # clicks +username
        h.swipe_view_add().click(), sleep(2)
        h.swipe_view_url_card().click(), sleep(4)
        h.back_button().click(), sleep(1)
        driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
Exemple #6
0
    def test_checking_blast_replies(self):
        # Login with account01 to check replies
        LoginWith().user(account01, password01, driver)

        # Opens replies from account02 and does a check to see if they were all received
        h.dusts_tab().click()
        h.username(account02).click()
        log("Checking if all replies were successful")
        try:
            sleep(2)
            driver.save_screenshot("C:\Screenshots\screenshottest01.jpg")
            if driver.find_elements_by_id("com.radicalapps.cyberdust:id/chat_bubble_view_message_text")and\
                    driver.find_element_by_id("com.radicalapps.cyberdust:id/emoji_view_image")and\
                    driver.find_element_by_id("com.radicalapps.cyberdust:id/photo_view_image")and\
                    driver.find_element_by_id("com.radicalapps.cyberdust:id/video_play_button"):
                log("All replies successfully received from %s" % account02)
        except Exception:
            log("All replies were not received", "Warning")
        sleep(1)
        driver.press_keycode(4)
Exemple #7
0
 def reblast_setup(self):
     log("Setting up reblast test")
     LoginWith().user(account02, password02, driver)
     h.blast_lists().click(), sleep(2)
     log("Creating a blast list")
     try:
         if driver.find_element_by_id("com.radicalapps.cyberdust:id/blast_groups_list_item_group_indicator"):
             h.blast_list_expand()  # Doesn't need .click() attribute
             h.blast_list_edit().click()
             h.blast_list_more().click()
             log("Deleting pre-existing blast list first")
             h.delete_list().click()
             h.confirm().click()
             h.blast_lists().click()
     except Exception:
         pass
     h.blast_list_field().send_keys("Reblast List")
     h.OK_button().click()
     h.username(account01).click()
     h.username(account03).click()
     h.OK_button().click()
Exemple #8
0
password02 = account02

account03 = "blasttest03"
password03 = account03

blast_url = "www.cyberdust.com"
blast_username = "******" + account01
################################

h = Home()
driver = WebDriver().driver()
sw = driver.get_window_size()['width']
sh = driver.get_window_size()['height']

# Logs into blast testing account
LoginWith().user(account01, password01, driver)


class BlastTest:
    def test_sending_text_blasts(self):
        # Creates a blast list
        h.blast_lists().click(), sleep(2)
        log("Creating a blast list")
        try:
            if driver.find_element_by_id(
                    "com.radicalapps.cyberdust:id/blast_groups_list_item_group_indicator"
            ):
                h.blast_list_expand()  # Doesn't need .click() attribute
                h.blast_list_edit().click()
                h.blast_list_more().click()
                log("Deleting pre-existing blast list first")
Exemple #9
0
    def test_pinning_messages(self):
        # Logs into existing testing account
        LoginWith().user(account_name, account_pw, driver)
        log("Logged In")

        h.action_menu().click()
        h.action_menu_dust().click()
        sleep(5)
        #m.chat_room_first_friend().click()
        h.chat_room_text_box().click()
        h.chat_room_text_box().send_keys(text_message)
        h.chat_room_send_button().click()
        log("Sent a dust")
        sleep(5)
        h.sent_text_blast().click()
        try:
            if h.pinned_message(2):
                log("Pinned a message")
        except Exception:
            log("Problem in pinning", "Error")
            pass

        log("Checking if Pinned icon appears")

        if h.tap_to_unpin_button():
            log("Pinned icon appears")
        else:
            log("Pinned icon does not appear")

        h.back_button().click()
        try:
            if h.pinned_message():
                log("Message is not disappered")
        except Exception:
            log("Message is disappeared")
            pass

        log("Checking if new messages appear below pinned messages")

        h.chat_room_text_box().send_keys(text_message)
        h.chat_room_send_button().click()
        h.chat_room_text_box().send_keys(text_message)
        h.chat_room_send_button().click()
        h.chat_room_text_box().send_keys(text_message)
        h.chat_room_send_button().click()
        try:
            if h.tap_to_unpin_button(2):
                log("New messages do not appear below pinned message", "Error")
        except Exception:
            log("New Messages appear below pinned message")
            pass
        h.back_button().click()

        h.tap_to_unpin_button().click()
        try:
            if h.sent_text_blast():
                log("Unpinned the message")
        except Exception:
            log("Unable to unpin" "Error")
            pass
        sleep(16)

        try:
            if h.sent_text_blast():
                log("Countdown did not resume")
        except Exception:
            log("Countdown resumed")
            pass

        h.back_button().click()
        h.back_button().click()
        m.more_button().click()

        driver.scroll(m.followers(), m.back_button())

        m.logout().click()
        m.confirm().click()