Skip to content

Commit

Permalink
e2e: fix login
Browse files Browse the repository at this point in the history
Signed-off-by: Parvesh Monu <[email protected]>
  • Loading branch information
pavloburykh authored and Parveshdhull committed Mar 22, 2023
1 parent 937c128 commit 8c358d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/appium/views/sign_in_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def click(self):
return self.navigate()


class SignInButton(Button):
class LogInButton(Button):
def __init__(self, driver):
super().__init__(driver, translation_id="sign-in")
super().__init__(driver, accessibility_id="login-button")

def navigate(self):
from views.home_view import HomeView
Expand Down Expand Up @@ -131,7 +131,7 @@ def __init__(self, driver):

self.password_input = EditBox(self.driver, accessibility_id="password-input")
self.migration_password_input = EditBox(self.driver, accessibility_id="enter-password-input")
self.sign_in_button = SignInButton(self.driver)
self.login_button = LogInButton(self.driver)
self.access_key_button = AccessKeyButton(self.driver)
self.generate_key_button = Button(self.driver, accessibility_id="generate-old-key")
self.your_keys_more_icon = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
Expand Down Expand Up @@ -233,8 +233,6 @@ def recover_access(self, passphrase: str, password: str = common_password, keyca

def sign_in(self, password=common_password, keycard=False, position=1):
self.driver.info("## Sign in (password:%s, keycard:%s)" % (password, str(keycard)), device=False)
if self.multi_account_on_login_button.is_element_displayed(30):
self.get_multiaccount_by_position(position).click()

if keycard:
from views.keycard_view import KeycardView
Expand All @@ -245,7 +243,7 @@ def sign_in(self, password=common_password, keycard=False, position=1):
keycard_view.connect_selected_card_button.click()
else:
self.password_input.set_value(password)
self.sign_in_button.click()
self.login_button.click()
self.driver.info("## Signed in successfully!", device=False)
return self.get_home_view()

Expand Down

0 comments on commit 8c358d4

Please sign in to comment.