Beispiel #1
0
 def test_loginWithIncorrectData(self):
     """Sprawdzenie możliwości zalogowania użytkownika na dane nieistniejące w serwisie"""
     mail = "*****@*****.**"
     password = '******'
     error = "Niestety podałeś niewłaściwy adres email lub hasło."
     hp = HomePage(self.driver)
     hp.accept_cookie_policy()
     hp.go_to_login_page()
     lp = LoginPage(self.driver)
     lp.fill_email(mail)
     lp.fill_password(password)
     lp.click_on_login_btn()
     errors = lp.visible_errors()
     self.assertEqual(
         error, errors,
         "Something went wrong, probably you are not logged in")
Beispiel #2
0
 def test_loginWithCorrectData(self):
     """Sprawdzenie możliwości zalogowania użytkownika przy wpisaniu poprawnych(istniejących w systemie) danych."""
     mail = "*****@*****.**"
     password = '******'
     greeting = "Witaj"
     hp = HomePage(self.driver)
     hp.accept_cookie_policy()
     hp.go_to_login_page()
     lp = LoginPage(self.driver)
     lp.fill_email(mail)
     lp.fill_password(password)
     lp.click_on_login_btn()
     ap = AccountPage(self.driver)
     greeting_text = ap.verify_logged_in()
     self.assertEqual(
         greeting, greeting_text,
         "Something went wrong, probably you are not logged in")
Beispiel #3
0
 def test_registeCorrectData(self):
     """checks the possibility to register account if the required fields are filled with the correct data
     and required regulations are selected"""
     mail = "*****@*****.**"
     password = '******'
     activation_info = 'Aktywacja konta w helion.pl, sprawdź swój e-mail!'
     hp = HomePage(self.driver)
     hp.accept_cookie_policy()
     hp.go_to_register_page()
     rp = RegisterPage(self.driver)
     rp.fill_email(mail)
     rp.fill_password(password)
     rp.repeat_password(password)
     rp.check_regulation()
     rp.click_on_register_btn()
     ap= AccountPage(self.driver)
     activation = ap.verify_registration()
     self.assertEqual(activation, activation_info, "Something went wrong, probably your accont was not created")
Beispiel #4
0
 def test_correctlyLoggedOut(self):
     """checks the possibility to correctly log out from an account"""
     mail = "*****@*****.**"
     password = '******'
     greeting = "Witaj"
     message = "Zostałeś poprawnie wylogowany"
     hp = HomePage(self.driver)
     hp.accept_cookie_policy()
     hp.go_to_login_page()
     lp = LoginPage(self.driver)
     lp.fill_email(mail)
     lp.fill_password(password)
     lp.click_on_login_btn()
     ap = AccountPage(self.driver)
     greeting_text = ap.verify_logged_in()
     self.assertEqual(
         greeting, greeting_text,
         "Something went wrong, probably you are not logged in")
     ap.click_on_logout_btn()
     logout_message = lp.verify_logout()
     self.assertEqual(
         message, logout_message,
         "Something went wrong, probably you are not logged out")