def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.google_drive.get_auth_url())
        try:
            enter_text_by_id(driver, "Email", DRIVE_EMAIL)
            enter_text_by_id(driver, "Passwd", DRIVE_PASSWD)

        # When
            click_button_by_id(driver, "submit_deny_access")
            wait_for_code(driver, 'access_denied')
        except:
            raise Exception("timeout for authorization")

        # Then
        driver.quit()
Example #2
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.box.get_auth_url())
        try:
            enter_text_by_id(driver, "login", BOX_EMAIL, False)
            enter_text_by_id(driver, "password", BOX_PASSWD)

        # When
            click_button_by_id(driver, "consent_reject_button")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(driver.current_url))
        driver.quit()
Example #3
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.box.get_auth_url())
        try:
            enter_text_by_id(driver, "login", BOX_EMAIL, False)
            enter_text_by_id(driver, "password", BOX_PASSWD)

            # When
            click_button_by_id(driver, "consent_reject_button")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(
            driver.current_url))
        driver.quit()