Exemplo n.º 1
0
 def test_valid_email_valid_pw_invalid_cpw(self):
     set_email_field(fake_valid_email())
     set_password_field(valid_password())
     set_password_confirmation_field(invalid_password())
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nPassword confirmation doesn't match Password"
     self.verify_error_explanation(expected)
Exemplo n.º 2
0
 def test_invalid_email_invalid_pw_invalid_cpw(self):
     pw = invalid_password()
     set_password_field(pw)
     set_password_confirmation_field(pw)
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()
Exemplo n.º 3
0
 def test_valid_email_valid_pw_invalid_cpw(self):
     set_email_field(fake_valid_email())
     set_password_field(valid_password())
     set_password_confirmation_field(invalid_password())
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nPassword confirmation doesn't match Password"
     self.verify_error_explanation(expected)
Exemplo n.º 4
0
 def test_valid_email_invalid_pw_valid_cpw(self):
     set_email_field(fake_valid_email())
     set_password_field(invalid_password())
     set_password_confirmation_field(valid_password())
     set_sign_up_button()
     expected = "2 errors prohibited this user from being saved:\nPassword confirmation doesn't match Password\nPassword is too short (minimum is 8 characters)"
     self.verify_error_explanation(expected)
Exemplo n.º 5
0
 def test_invalid_email_invalid_pw_invalid_cpw(self):
     pw = invalid_password()
     set_password_field(pw)
     set_password_confirmation_field(pw)
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()
Exemplo n.º 6
0
 def test_valid_email_invalid_pw_valid_cpw(self):
     set_email_field(fake_valid_email())
     set_password_field(invalid_password())
     set_password_confirmation_field(valid_password())
     set_sign_up_button()
     expected = "2 errors prohibited this user from being saved:\nPassword confirmation doesn't match Password\nPassword is too short (minimum is 8 characters)"
     self.verify_error_explanation(expected)
Exemplo n.º 7
0
 def test_valid_email_forgot_password_send_password_button(self):
     set_forgot_your_password()
     set_email_field(self.valid_email)
     set_forgot_your_password_send_password_button()
     actual = get_h1()
     error_dialog = "We're sorry, but something went wrong."
     if actual == error_dialog:
         raise ValueError('ERROR: clicking the "Send me reset password instructions" button opens up an error page!')
    def test_sign_out_link(self):
        expected = 'https://avant-qa-screening.herokuapp.com/'
        self.verify_landing_dash_page_links(0, expected, False)

        # clean up steps (this test only) logs back in
        go_to('https://avant-qa-screening.herokuapp.com/users/sign_in')
        set_email_field(self.valid_email)
        set_password_field(self.valid_pw)
        set_log_in_button()
Exemplo n.º 9
0
    def test_sign_out_link(self):
        expected = 'https://avant-qa-screening.herokuapp.com/'
        self.verify_landing_dash_page_links(0, expected, False)

        # clean up steps (this test only) logs back in
        go_to('https://avant-qa-screening.herokuapp.com/users/sign_in')
        set_email_field(self.valid_email)
        set_password_field(self.valid_pw)
        set_log_in_button()
Exemplo n.º 10
0
 def test_valid_email_valid_pw(self):
     set_email_field(self.valid_email)
     set_password_field(self.valid_pw)
     set_log_in_button()
     expected = 'https://avant-qa-screening.herokuapp.com/dashboard'
     actual = get_current_url()
     self.assertEqual(expected, actual,
                      msg='FAILED: url expected after login = {0}, got url = {1}'.format(expected, actual))
     test_print('Successfully verified login', flash='!')
Exemplo n.º 11
0
 def test_valid_email_forgot_password_send_password_button(self):
     set_forgot_your_password()
     set_email_field(self.valid_email)
     set_forgot_your_password_send_password_button()
     actual = get_h1()
     error_dialog = "We're sorry, but something went wrong."
     if actual == error_dialog:
         raise ValueError(
             'ERROR: clicking the "Send me reset password instructions" button opens up an error page!'
         )
Exemplo n.º 12
0
 def test_existing_user(self):
     email, pw = create_valid_account()
     stop()  # cleanup step
     go_to(self.chk_url)
     set_email_field(email)
     set_password_field(pw)
     set_password_confirmation_field(pw)
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nEmail has already been taken"
     self.verify_error_explanation(expected)
     stop()  # cleanup step
Exemplo n.º 13
0
 def test_existing_user(self):
     email, pw = create_valid_account()
     stop() # cleanup step
     go_to(self.chk_url)
     set_email_field(email)
     set_password_field(pw)
     set_password_confirmation_field(pw)
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nEmail has already been taken"
     self.verify_error_explanation(expected)
     stop() # cleanup step
Exemplo n.º 14
0
 def test_valid_email_valid_pw(self):
     set_email_field(self.valid_email)
     set_password_field(self.valid_pw)
     set_log_in_button()
     expected = 'https://avant-qa-screening.herokuapp.com/dashboard'
     actual = get_current_url()
     self.assertEqual(
         expected,
         actual,
         msg='FAILED: url expected after login = {0}, got url = {1}'.format(
             expected, actual))
     test_print('Successfully verified login', flash='!')
Exemplo n.º 15
0
 def test_invalid_email_forgot_password_send_password_button(self):
     set_forgot_your_password()
     url = get_current_url()
     set_email_field(invalid_email())
     actual = get_error_explanation(False)
     self.verify_sign_up_label()
     self.assertFalse(actual,
                      msg='FAILED: expected no error explanation, but got error explanation = "{0}" on url = {1}'.format(actual, get_current_url()))
     test_print('Successfully verified no error explanation'.format(actual), flash='!')
     self.assertEqual(url, get_current_url(),
                      msg='FAILED: expected url = {0}, got url = {1}'.format(url, get_current_url()))
     test_print('Successfully verified login was unsuccessful, user is still on the sign_up page', flash='!')
Exemplo n.º 16
0
 def test_invalid_email_forgot_password_send_password_button(self):
     set_forgot_your_password()
     url = get_current_url()
     set_email_field(invalid_email())
     actual = get_error_explanation(False)
     self.verify_sign_up_label()
     self.assertFalse(
         actual,
         msg=
         'FAILED: expected no error explanation, but got error explanation = "{0}" on url = {1}'
         .format(actual, get_current_url()))
     test_print('Successfully verified no error explanation'.format(actual),
                flash='!')
     self.assertEqual(
         url,
         get_current_url(),
         msg='FAILED: expected url = {0}, got url = {1}'.format(
             url, get_current_url()))
     test_print(
         'Successfully verified login was unsuccessful, user is still on the sign_up page',
         flash='!')
Exemplo n.º 17
0
 def test_invalid_email_blank_pw(self):
     set_email_field(invalid_email())
     set_log_in_button()
     self.verify_invalid_sign_in()
Exemplo n.º 18
0
 def test_invalid_email_invalid_pw(self):
     set_email_field(invalid_email())
     set_password_field(invalid_password())
     set_log_in_button()
     self.verify_invalid_sign_in()
Exemplo n.º 19
0
 def test_invalid_email_blank_pw(self):
     set_email_field(invalid_email())
     set_log_in_button()
     self.verify_invalid_sign_in()
Exemplo n.º 20
0
 def test_invalid_email_blank_pw_blank_cpw(self):
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()
Exemplo n.º 21
0
 def test_invalid_email_blank_pw_valid_cpw(self):
     set_password_confirmation_field(valid_password())
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()
Exemplo n.º 22
0
 def test_valid_email_blank_pw_blank_cpw(self):
     set_email_field(fake_valid_email())
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nPassword can't be blank"
     self.verify_error_explanation(expected)
Exemplo n.º 23
0
 def test_valid_email_blank_pw_blank_cpw(self):
     set_email_field(fake_valid_email())
     set_sign_up_button()
     expected = "1 error prohibited this user from being saved:\nPassword can't be blank"
     self.verify_error_explanation(expected)
Exemplo n.º 24
0
 def test_invalid_email_invalid_pw(self):
     set_email_field(invalid_email())
     set_password_field(invalid_password())
     set_log_in_button()
     self.verify_invalid_sign_in()
Exemplo n.º 25
0
 def test_invalid_email_blank_pw_blank_cpw(self):
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()
Exemplo n.º 26
0
 def test_invalid_email_blank_pw_valid_cpw(self):
     set_password_confirmation_field(valid_password())
     set_email_field(invalid_email())
     set_sign_up_button()
     self.verify_invalid_email()