e2e: reset password + fix

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2021-07-14 16:49:27 +02:00
parent 306b81ed71
commit bc6ed19579
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
5 changed files with 49 additions and 4 deletions

View File

@ -147,6 +147,44 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(695850)
@marks.medium
def test_can_reset_password(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
new_password = basic_user['special_chars_password']
profile = home.profile_button.click()
profile.privacy_and_security_button.click()
profile.just_fyi("Check that can not reset password when entering wrong current password")
profile.reset_password_button.click()
profile.current_password_edit_box.send_keys(common_password + '1')
profile.new_password_edit_box.set_value(new_password)
profile.confirm_new_password_edit_box.set_value(new_password)
profile.next_button.click()
if not profile.current_password_wrong_text.is_element_displayed():
self.errors.append("Validation error for wrong current password is not shown")
profile.just_fyi("Check that can not procced if did not confirm new password")
profile.current_password_edit_box.clear()
profile.current_password_edit_box.set_value(common_password)
profile.new_password_edit_box.set_value(new_password)
profile.confirm_new_password_edit_box.set_value(new_password+'1')
profile.next_button.click()
profile.just_fyi("Delete last symbol and check that can reset password")
profile.confirm_new_password_edit_box.delete_last_symbols(1)
profile.next_button.click()
profile.element_by_translation_id("password-reset-success").wait_for_element(30)
profile.element_by_translation_id("okay").click()
profile.just_fyi("Login with new password")
sign_in.sign_in(password=new_password)
if not sign_in.home_button.is_element_displayed():
self.errors.append("Could not sign in with new password after reset")
self.errors.verify_no_errors()
@marks.testrail_id(6296)
@marks.high
def test_recover_account_from_new_user_seedphrase(self):

View File

@ -32,7 +32,7 @@ class TestCommunitiesMultipleDevices(MultipleDeviceTestCase):
home_2.just_fyi("Tapping on community link and request membership")
pub_2 = home_2.join_public_chat(pub_chat_name)
# TODO: due to #12271
pub_2.element_by_text(community_name).wait_for_element(180)
pub_2.element_by_text(community_name).wait_for_element(300)
community_message_2 = pub_2.get_community_link_preview_by_text(community_link_text)
if community_message_2.community_description != community_description:
self.errors.append("Community description '%s' does not match expected" % community_message_2.community_description)
@ -48,6 +48,7 @@ class TestCommunitiesMultipleDevices(MultipleDeviceTestCase):
community_1 = home_1.get_chat(community_name, community=True).click()
community_1.community_options_button.click()
community_1.community_info_button.click()
community_1.community_membership_request_value.wait_for_element(60)
if community_1.community_membership_request_value.text != '1':
self.drivers[0].fail("Membership request value '%s' is not equal expected" % community_1.community_membership_request_value)

View File

@ -934,7 +934,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
wallet_view.home_button.click()
if 'dapp' in key:
home_view.open_in_status_button.click()
if not chat_view.allow_button.is_element_displayed():
if not (chat_view.allow_button.is_element_displayed() or chat_view.element_by_text("Can't find web3 library").is_element_displayed()):
self.errors.append('No allow button is shown in case of navigating to Status dapp!')
chat_view.dapp_tab_button.click()
chat_view.home_button.click()

View File

@ -621,11 +621,11 @@ class ChatView(BaseView):
return IncomingTransaction(self.driver, account, transaction_value)
def get_preview_message_by_text(self, text=None) -> object:
self.driver.info('**Getting preview message for link:%s**' % text)
self.driver.info('**Getting preview message for link:** %s' % text)
return PreviewMessage(self.driver, text)
def get_community_link_preview_by_text(self, text=None) -> object:
self.driver.info('**Getting community preview message for link:%s**' % text)
self.driver.info('**Getting community preview message for link:** %s' % text)
return CommunityLinkPreviewMessage(self.driver, text)
def delete_chat(self):

View File

@ -202,6 +202,12 @@ class ProfileView(BaseView):
self.privacy_and_security_button = Button(self.driver, accessibility_id="privacy-and-security-settings-button")
self.accept_new_chats_from = Button(self.driver, accessibility_id="accept-new-chats-from")
self.accept_new_chats_from_contacts_only = Button(self.driver, translation_id="contacts")
self.reset_password_button = Button(self.driver, accessibility_id="reset-password")
self.current_password_edit_box = EditBox(self.driver, accessibility_id="current-password")
self.new_password_edit_box = EditBox(self.driver, accessibility_id="new-password")
self.confirm_new_password_edit_box = EditBox(self.driver, accessibility_id="confirm-new-password")
self.current_password_wrong_text = Text(self.driver, accessibility_id="current-password-error")
# Appearance
self.appearance_button = Button(self.driver, accessibility_id="appearance-settings-button")
self.show_profile_pictures_of = Button(self.driver, accessibility_id="show-profile-pictures")