def test_unsuccessful_authorization_password(self, login, password): """ Enter valid mail and invalid password to check authorization, get authorization error message text to verify the text of the error msg """ login_popup = LoginPopup() login_popup.authorize(login, password) assert 'Неправильный адрес электронной почты (email) или пароль' in login_popup.get_error_text_wrong_pass(), \ 'The text of the error msg about wrong password is different or absent'
def test_unsuccessful_authorization_mail(self, login, password): """ Enter invalid mail(without ".", without "@") and valid password to check authorization, gets authorization error message text to verify the text of the error message """ login_popup = LoginPopup() login_popup.authorize(login, password) assert 'Пожалуйста, введите правильный адрес электронной почты' in login_popup.get_error_text_wrong_email(), \ 'The text of the error msg about wrong email is different or absent'
def test_successful_authorization(self): """ Enter valid mail and valid password to check successful authorization, check whether popup after authorization with options is visible """ login_popup = LoginPopup() login_popup.authorize(login='******', password='******') time.sleep(1) panel = Panel() assert panel.is_popup_visible_after_authorization() is True, \ 'Popup after authorization is not visible or absent'