예제 #1
0
 def test_register_ngo_without_entering_data(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(WITHOUT_ENTERING_REQUIRED_FIELDS)
     self.assertRegexpMatches(
         registration_page.get_error_message(),
         WITHOUT_ENTERING_REQUIRED_FIELDS_ERROR_MESSAGE)
예제 #2
0
 def test_register_ngo_with_existing_email_address(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(EXISTING_EMAIL_ADDRESS)
     self.assertEquals(registration_page.get_error_message(), EXISTING_EMAIL_ADDRESS_ERROR_MESSAGE)
     a = self.driver.switch_to_active_element()
     self.assertEqual(a.get_attribute("value"), EXISTING_EMAIL_ADDRESS.get(ORGANIZATION_OFFICE_PHONE))
예제 #3
0
 def test_register_ngo_with_invalid_web_url(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(INVALID_WEBSITE_URL)
     time.sleep(5)
     self.assertEquals(registration_page.get_error_message(),
                       fetch_(ERROR_MESSAGE, from_(INVALID_WEBSITE_URL)))
 def prerequisites_of_activate_account(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_confirmation_page, self.email = registration_page.successful_registration_with(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)
     self.assertEquals(registration_confirmation_page.registration_success_message(),
         fetch_(SUCCESS_MESSAGE, from_(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)))
     return self.email
예제 #5
0
 def test_register_ngo_without_entering_data(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(WITHOUT_ENTERING_REQUIRED_FIELDS)
     time.sleep(5)
     self.assertEquals(registration_page.get_error_message(),
                       fetch_(ERROR_MESSAGE, from_(WITHOUT_ENTERING_REQUIRED_FIELDS)))
예제 #6
0
 def test_register_ngo_with_unmatched_passwords(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(UNMATCHED_PASSWORD)
     time.sleep(5)
     self.assertEquals(registration_page.get_error_message(),
                       fetch_(ERROR_MESSAGE, from_(UNMATCHED_PASSWORD)))
예제 #7
0
 def test_register_ngo_with_invalid_email_address(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(INVALID_EMAIL_FORMAT)
     time.sleep(5)
     self.assertEquals(registration_page.get_error_message(),
                       fetch_(ERROR_MESSAGE, from_(INVALID_EMAIL_FORMAT)))
예제 #8
0
 def test_register_ngo_with_existing_email_address(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(EXISTING_EMAIL_ADDRESS)
     time.sleep(5)
     self.assertEquals(registration_page.get_error_message(), fetch_(ERROR_MESSAGE,
                from_(EXISTING_EMAIL_ADDRESS)))
예제 #9
0
 def register_trial_account(self):
     self.driver.go_to(url("/register/trial"))
     registration_page = RegistrationPage(self.driver)
     registration_confirmation_page, email = registration_page.successful_registration_with(
         REGISTRATION_DATA_FOR_SUCCESSFUL_TRIAL_REGISTRATION)
     self.assertEquals(registration_confirmation_page.registration_success_message(),
                       SUCCESS_MESSAGE)
예제 #10
0
    def test_successful_registration(self):

        self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
        registration_page = RegistrationPage(self.driver)
        registration_confirmation_page, email = registration_page.successful_registration_with(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)
        self.assertEquals(registration_confirmation_page.registration_success_message(),
            fetch_(SUCCESS_MESSAGE,
                   from_(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)))
예제 #11
0
 def test_register_without_preferred_payment(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_confirmation_page, email = registration_page.successful_registration_with(
         WITHOUT_PREFERRED_PAYMENT)
     self.assertEquals(
         registration_confirmation_page.registration_success_message(),
         REGISTRATION_SUCCESS_MESSAGE)
 def register_trial_account(self):
     self.driver.go_to("localhost:%s/register/trial" % get_test_port())
     registration_page = RegistrationPage(self.driver)
     registration_confirmation_page, email = registration_page.successful_registration_with(
         REGISTRATION_DATA_FOR_SUCCESSFUL_TRIAL_REGISTRATION)
     time.sleep(2)
     self.assertEquals(
         registration_confirmation_page.registration_success_message(),
         SUCCESS_MESSAGE)
예제 #13
0
 def test_user_focus_must_be_on_email_field(self):
     self.driver.go_to(DATA_WINNER_REGISTER_TRIAL_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(
         REGISTRATION_DATA_FOR_UNSUCCESSFUL_TRIAL_REGISTRATION)
     self.assertEqual(registration_page.get_error_message(),
                      INVALID_EMAIL_ERROR_MESSAGE)
     a = self.driver.switch_to_active_element()
     self.assertEqual(a.get_attribute("id"), u"id_email")
 def prerequisites_of_activate_account(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_confirmation_page, self.email = registration_page.successful_registration_with(
         REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)
     self.assertEquals(
         registration_confirmation_page.registration_success_message(),
         fetch_(SUCCESS_MESSAGE,
                from_(REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)))
     return self.email
예제 #15
0
    def navigate_to_registration_page(self):
        """
        Function to click on register page link which is available on the login page

        Return RegistrationPage
        """
        self.driver.find(CREATE_AN_ACCOUNT_LINK).click()
        return RegistrationPage(self.driver)
예제 #16
0
 def test_register_ngo_with_begin_end_spaced_password(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(BEGIN_END_SPACED_PASSWORD)
     self.assertEquals(BEGIN_END_SPACED_PASSWORD_ERROR_MESSAGE,
                       registration_page.get_error_message())
예제 #17
0
def register_and_get_email_for_trial(driver):
    driver.go_to(DATA_WINNER_REGISTER_TRIAL_PAGE)
    registration_page = RegistrationPage(driver)
    registration_confirmation_page, email = registration_page.successful_registration_with(
        REGISTRATION_DATA_FOR_SUCCESSFUL_TRIAL_REGISTRATION)
    return registration_confirmation_page, email
예제 #18
0
def register_and_get_email(driver):
    driver.go_to(DATA_WINNER_REGISTER_PAGE)
    registration_page = RegistrationPage(driver)
    return registration_page.successful_registration_with(
        REGISTRATION_DATA_FOR_SUCCESSFUL_REGISTRATION)
예제 #19
0
 def test_register_ngo_with_white_space_passwords(self):
     self.driver.go_to(DATA_WINNER_REGISTER_PAGE)
     registration_page = RegistrationPage(self.driver)
     registration_page.register_with(WHITE_SPACE_IN_SOME_FIELDS)
     self.assertEquals(registration_page.get_error_message(),
                       WHITE_SPACES_ERROR_MESSAGE)