bootnode e2e + translations + new checks in e2e

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-04-23 17:42:20 +02:00
parent 2a4641684f
commit 57f1303c5f
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
18 changed files with 78 additions and 41 deletions

View File

@ -47,23 +47,25 @@
[react/scroll-view {:keyboard-should-persist-taps :handled} [react/scroll-view {:keyboard-should-persist-taps :handled}
[react/view styles/edit-bootnode-view [react/view styles/edit-bootnode-view
[text-input/text-input-with-label [text-input/text-input-with-label
{:label (i18n/label :t/name) {:label (i18n/label :t/name)
:placeholder (i18n/label :t/specify-name) :placeholder (i18n/label :t/specify-name)
:style styles/input :accessibility-label :bootnode-name
:container styles/input-container :style styles/input
:default-value name :container styles/input-container
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :name %]) :default-value name
:auto-focus true}] :on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :name %])
:auto-focus true}]
[react/view [react/view
{:flex 1} {:flex 1}
[text-input/text-input-with-label [text-input/text-input-with-label
(merge (merge
{:label (i18n/label :t/bootnode-address) {:label (i18n/label :t/bootnode-address)
:placeholder (i18n/label :t/bootnode-format) :placeholder (i18n/label :t/bootnode-format)
:style styles/input :style styles/input
:container styles/input-container :accessibility-label :bootnode-address
:default-value url :container styles/input-container
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :url %])} :default-value url
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :url %])}
(when-not platform/desktop? {:content qr-code}))] (when-not platform/desktop? {:content qr-code}))]
(when (and (not (string/blank? url)) invalid-url?) (when (and (not (string/blank? url)) invalid-url?)
[tooltip/tooltip (i18n/label :t/invalid-format [tooltip/tooltip (i18n/label :t/invalid-format

View File

@ -24,8 +24,9 @@
bootnodes [:custom-bootnodes/network-bootnodes]] bootnodes [:custom-bootnodes/network-bootnodes]]
[react/view {:flex 1} [react/view {:flex 1}
[topbar/topbar {:title :t/bootnodes-settings [topbar/topbar {:title :t/bootnodes-settings
:accessories [{:icon :main-icons/add :accessories [{:icon :main-icons/add
:handler #(navigate-to-add-bootnode nil)}]}] :accessibility-label :add-bootnode
:handler #(navigate-to-add-bootnode nil)}]}]
[react/view styles/switch-container [react/view styles/switch-container
[profile.components/settings-switch-item [profile.components/settings-switch-item
{:label-kw :t/bootnodes-enabled {:label-kw :t/bootnodes-enabled

View File

@ -224,6 +224,11 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
self.errors.append('No ENS name is shown in own profile after adding') self.errors.append('No ENS name is shown in own profile after adding')
if not dapp_view.element_by_text('%s.stateofus.eth' % ens_user['ens']).is_element_displayed(): if not dapp_view.element_by_text('%s.stateofus.eth' % ens_user['ens']).is_element_displayed():
self.errors.append('No ENS name is shown in own profile after adding') self.errors.append('No ENS name is shown in own profile after adding')
profile.share_my_profile_button.click()
if profile.ens_name_in_share_chat_key_text.text != '%s.stateofus.eth' % ens_user['ens']:
self.errors.append('No ENS name is shown on tapping on share icon in Profile')
profile.close_share_popup()
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(5475) @marks.testrail_id(5475)
@ -606,8 +611,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(5432) @marks.testrail_id(5432)
@marks.medium @marks.medium
@marks.skip
# TODO: e2e blocker 9135: no force-logout after enabling bootnode (enable after fix)
def test_custom_bootnodes(self): def test_custom_bootnodes(self):
self.create_drivers(2) self.create_drivers(2)
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -616,15 +619,25 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
profile_1, profile_2 = home_1.profile_button.click(), home_2.profile_button.click() profile_1, profile_2 = home_1.profile_button.click(), home_2.profile_button.click()
username_1, username_2 = profile_1.default_username_text.text, profile_2.default_username_text.text username_1, username_2 = profile_1.default_username_text.text, profile_2.default_username_text.text
profile_1.just_fyi('Add custom bootnode, enable bootnodes and check validation')
profile_1.advanced_button.click() profile_1.advanced_button.click()
profile_1.bootnodes_button.click() profile_1.bootnodes_button.click()
profile_1.plus_button.click() profile_1.add_bootnode_button.click()
profile_1.specify_name_input.set_value('test') profile_1.specify_name_input.set_value('test')
profile_1.bootnode_address_input.set_value('invalid_bootnode_address')
if not profile_1.element_by_text_part('Invalid format').is_element_displayed():
self.errors.append('Validation message about invalid format of bootnode is not shown')
profile_1.save_button.click()
if profile_1.add_bootnode_button.is_element_displayed():
self.errors.append('User was navigated to another screen when tapped on disabled "Save" button')
profile_1.bootnode_address_input.clear()
profile_1.bootnode_address_input.set_value(bootnode_address) profile_1.bootnode_address_input.set_value(bootnode_address)
profile_1.save_button.click() profile_1.save_button.click()
profile_1.enable_bootnodes.click() profile_1.enable_bootnodes.click()
sign_in_1.sign_in() profile_1.home_button.click()
profile_1.just_fyi('Add contact and send first message')
chat_1 = home_1.add_contact(public_key) chat_1 = home_1.add_contact(public_key)
message = 'test message' message = 'test message'
chat_1.chat_message_input.send_keys(message) chat_1.chat_message_input.send_keys(message)
@ -634,18 +647,20 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
chat_2.chat_element_by_text(message).wait_for_visibility_of_element() chat_2.chat_element_by_text(message).wait_for_visibility_of_element()
chat_2.add_to_contacts.click() chat_2.add_to_contacts.click()
chat_1.get_back_to_home_view() profile_1.just_fyi('Disable custom bootnodes')
home_1.profile_button.click() chat_1.profile_button.click()
profile_1.advanced_button.click()
profile_1.bootnodes_button.click()
profile_1.enable_bootnodes.click() profile_1.enable_bootnodes.click()
sign_in_1.sign_in() profile_1.home_button.click()
profile_1.just_fyi('Send message and check that it is received after disabling bootnodes')
home_1.get_chat(username_2).click() home_1.get_chat(username_2).click()
message_1 = 'new message' message_1 = 'new message'
chat_1.chat_message_input.send_keys(message_1) chat_1.chat_message_input.send_keys(message_1)
chat_1.send_message_button.click() chat_1.send_message_button.click()
chat_2.chat_element_by_text(message_1).wait_for_visibility_of_element() for chat in chat_1, chat_2:
if not chat.chat_element_by_text(message_1).is_element_displayed():
self.errors.append('Message was not received after enabling bootnodes!')
self.errors.verify_no_errors()
@marks.testrail_id(5436) @marks.testrail_id(5436)
@marks.medium @marks.medium

View File

@ -35,8 +35,15 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
request_transaction.request_transaction_button.click() request_transaction.request_transaction_button.click()
chat_2_request_message = chat_2.chat_element_by_text('↓ Incoming transaction') chat_2_request_message = chat_2.chat_element_by_text('↓ Incoming transaction')
chat_2_request_message.long_press_element()
if chat_2.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Incoming transaction message!')
chat_1 = home_1.get_chat(device_2_username).click() chat_1 = home_1.get_chat(device_2_username).click()
chat_1_sender_message = chat_1.chat_element_by_text('↑ Outgoing transaction') chat_1_sender_message = chat_1.chat_element_by_text('↑ Outgoing transaction')
chat_1_sender_message.long_press_element()
if chat_1.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Outgoing transaction message!')
send_message = chat_1_sender_message.sign_and_send.click() send_message = chat_1_sender_message.sign_and_send.click()
send_message.next_button.click() send_message.next_button.click()
send_message.sign_transaction() send_message.sign_transaction()

View File

@ -29,6 +29,11 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
send_transaction.confirm() send_transaction.confirm()
send_transaction.chose_recipient_button.click() send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click() send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value('0xDE709F2102306220921060314715629080E2fB77')
send_transaction.done_button.click()
if not send_transaction.element_by_text_part('Invalid address').is_element_displayed():
self.errors.append('Invalid EIP55 address is resolved correctly')
send_transaction.ok_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address']) send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click() send_transaction.done_button.click()
send_transaction.sign_transaction_button.click() send_transaction.sign_transaction_button.click()

View File

@ -164,7 +164,7 @@ class ChatUrlText(BaseText):
class SearchChatInput(BaseEditBox): class SearchChatInput(BaseEditBox):
def __init__(self, driver): def __init__(self, driver):
super().__init__(driver) super().__init__(driver)
self.locator = self.Locator.xpath_selector('//android.widget.EditText') self.locator = self.Locator.text_selector('Search')
class HomeView(BaseView): class HomeView(BaseView):

View File

@ -163,6 +163,13 @@ class ShareButton(BaseButton):
self.locator = self.Locator.accessibility_id('share-my-contact-code-button') self.locator = self.Locator.accessibility_id('share-my-contact-code-button')
class ENSUsernameInShareChatKeyPopup(BaseText):
def __init__(self, driver):
super(ENSUsernameInShareChatKeyPopup, self).__init__(driver)
self.locator = self.Locator.accessibility_id('ens-username')
class AdvancedButton(BaseButton): class AdvancedButton(BaseButton):
def __init__(self, driver): def __init__(self, driver):
@ -345,15 +352,14 @@ class AddBootnodeButton(BaseButton):
def __init__(self, driver): def __init__(self, driver):
super(AddBootnodeButton, self).__init__(driver) super(AddBootnodeButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector("(//*[@content-desc='icon'])[2]") self.locator = self.Locator.accessibility_id("add-bootnode")
class BootnodeAddressInput(BaseEditBox): class BootnodeAddressInput(BaseEditBox):
def __init__(self, driver): def __init__(self, driver):
super(BootnodeAddressInput, self).__init__(driver) super(BootnodeAddressInput, self).__init__(driver)
self.locator = self.Locator.xpath_selector( self.locator = self.Locator.accessibility_id("bootnode-address")
"//*[@text='Bootnode address']/following-sibling::*[1]/android.widget.EditText")
class EnableBootnodesToggle(BaseEditBox): class EnableBootnodesToggle(BaseEditBox):
@ -547,7 +553,6 @@ class ENSUsernameInChatSettings(BaseElement):
"//*[@content-desc='chat-icon']/../android.widget.TextView[2]") "//*[@content-desc='chat-icon']/../android.widget.TextView[2]")
class ProfileView(BaseView): class ProfileView(BaseView):
def __init__(self, driver): def __init__(self, driver):
@ -615,6 +620,7 @@ class ProfileView(BaseView):
self.bootnodes_button = BootnodesButton(self.driver) self.bootnodes_button = BootnodesButton(self.driver)
self.bootnode_address_input = BootnodeAddressInput(self.driver) self.bootnode_address_input = BootnodeAddressInput(self.driver)
self.enable_bootnodes = EnableBootnodesToggle(self.driver) self.enable_bootnodes = EnableBootnodesToggle(self.driver)
self.add_bootnode_button = AddBootnodeButton(self.driver)
# Mailservers # Mailservers
self.mail_server_button = MailServerButton(self.driver) self.mail_server_button = MailServerButton(self.driver)
@ -635,6 +641,7 @@ class ProfileView(BaseView):
# ENS # ENS
self.username_in_ens_chat_settings_text = ENSUsernameInChatSettings(self.driver) self.username_in_ens_chat_settings_text = ENSUsernameInChatSettings(self.driver)
self.ens_usernames_button = ENSusernames(self.driver) self.ens_usernames_button = ENSusernames(self.driver)
self.ens_name_in_share_chat_key_text = ENSUsernameInShareChatKeyPopup(self.driver)
# Mobile Data # Mobile Data
self.use_mobile_data = UseMobileDataToggle(self.driver) self.use_mobile_data = UseMobileDataToggle(self.driver)

View File

@ -260,6 +260,7 @@ class SignInView(BaseView):
return self.get_home_view() return self.get_home_view()
def sign_in(self, password=common_password, keycard=False): def sign_in(self, password=common_password, keycard=False):
self.rooted_device_continue()
self.multi_account_on_login_button.wait_for_visibility_of_element(5) self.multi_account_on_login_button.wait_for_visibility_of_element(5)
self.multi_account_on_login_button.click() self.multi_account_on_login_button.click()
if keycard: if keycard:
@ -282,5 +283,4 @@ class SignInView(BaseView):
def open_weblink_and_login(self, url_weblink): def open_weblink_and_login(self, url_weblink):
self.open_universal_web_link(url_weblink) self.open_universal_web_link(url_weblink)
self.rooted_device_continue()
self.sign_in() self.sign_in()

View File

@ -373,7 +373,7 @@
"ens-release-username": "Liberar nombre de usuario", "ens-release-username": "Liberar nombre de usuario",
"ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.", "ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.",
"ens-remove-username": "Eliminar nombre de usuario", "ens-remove-username": "Eliminar nombre de usuario",
"ens-saved": "ahora está conectado con tu clave de chat y se puede usar en Status.", "ens-saved": " ahora está conectado con tu clave de chat y se puede usar en Status.",
"ens-saved-title": "Nombre de usuario agregado", "ens-saved-title": "Nombre de usuario agregado",
"ens-show-username": "Mostrar mi nombre de usuario ENS en los chats", "ens-show-username": "Mostrar mi nombre de usuario ENS en los chats",
"ens-terms-header": "Términos de registro de nombre", "ens-terms-header": "Términos de registro de nombre",

View File

@ -375,7 +375,7 @@
"ens-release-username": "Liberar nombre de usuario", "ens-release-username": "Liberar nombre de usuario",
"ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.", "ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.",
"ens-remove-username": "Eliminar nombre de usuario", "ens-remove-username": "Eliminar nombre de usuario",
"ens-saved": "ahora está conectado con tu clave de chat y se puede usar en Status.", "ens-saved": " ahora está conectado con tu clave de chat y se puede usar en Status.",
"ens-saved-title": "Nombre de usuario agregado", "ens-saved-title": "Nombre de usuario agregado",
"ens-show-username": "Mostrar mi nombre de usuario ENS en los chats", "ens-show-username": "Mostrar mi nombre de usuario ENS en los chats",
"ens-terms-header": "Términos de registro de nombre", "ens-terms-header": "Términos de registro de nombre",

View File

@ -401,7 +401,7 @@
"ens-release-username": "Bitawan ang username", "ens-release-username": "Bitawan ang username",
"ens-remove-hints": "Ang pagtanggal ay tatanggalin ang username mula sa iyong susi.", "ens-remove-hints": "Ang pagtanggal ay tatanggalin ang username mula sa iyong susi.",
"ens-remove-username": "Alisin ang username", "ens-remove-username": "Alisin ang username",
"ens-saved": "ay konektado ngayon sa iyong susi sa chat at maaaring magamit sa Katayuan.", "ens-saved": " ay konektado ngayon sa iyong susi sa chat at maaaring magamit sa Katayuan.",
"ens-saved-title": "Idinagdag ang username", "ens-saved-title": "Idinagdag ang username",
"ens-show-username": "Ipakita ang aking pangalan ng ENS sa mga chat", "ens-show-username": "Ipakita ang aking pangalan ng ENS sa mga chat",
"ens-terms-header": "Mga tuntunin ng pagpaparehistro ng pangalan", "ens-terms-header": "Mga tuntunin ng pagpaparehistro ng pangalan",

View File

@ -377,7 +377,7 @@
"ens-release-username": "Nom d'utilisateur libre", "ens-release-username": "Nom d'utilisateur libre",
"ens-remove-hints": "La suppression séparera le nom d'utilisateur de votre clé.", "ens-remove-hints": "La suppression séparera le nom d'utilisateur de votre clé.",
"ens-remove-username": "Supprimer le nom d'utilisateur", "ens-remove-username": "Supprimer le nom d'utilisateur",
"ens-saved": "est maintenant connecté avec votre code de contact et peut être utilisé sur Status.", "ens-saved": " est maintenant connecté avec votre code de contact et peut être utilisé sur Status.",
"ens-saved-title": "Nom d'utilisateur ajouté", "ens-saved-title": "Nom d'utilisateur ajouté",
"ens-show-username": "Afficher mon nom d'utilisateur ENS dans les chats", "ens-show-username": "Afficher mon nom d'utilisateur ENS dans les chats",
"ens-terms-header": "Conditions d'enregistrement des noms", "ens-terms-header": "Conditions d'enregistrement des noms",

View File

@ -368,7 +368,7 @@
"ens-release-username": "Lepaskan nama pengguna", "ens-release-username": "Lepaskan nama pengguna",
"ens-remove-hints": "Menghapus akan melepaskan nama pengguna dari kunci Anda.", "ens-remove-hints": "Menghapus akan melepaskan nama pengguna dari kunci Anda.",
"ens-remove-username": "Hapus nama pengguna", "ens-remove-username": "Hapus nama pengguna",
"ens-saved": "sekarang terhubung dengan kunci obrolan Anda dan dapat digunakan dalam Status.", "ens-saved": " sekarang terhubung dengan kunci obrolan Anda dan dapat digunakan dalam Status.",
"ens-saved-title": "Nama pengguna ditambahkan", "ens-saved-title": "Nama pengguna ditambahkan",
"ens-show-username": "Tampilkan nama pengguna ENS saya dalam obrolan", "ens-show-username": "Tampilkan nama pengguna ENS saya dalam obrolan",
"ens-terms-header": "Ketentuan registrasi nama", "ens-terms-header": "Ketentuan registrasi nama",

View File

@ -377,7 +377,7 @@
"ens-release-username": "Rilascia nome utente", "ens-release-username": "Rilascia nome utente",
"ens-remove-hints": "La rimozione scollegherà il nome utente dalla chiave.", "ens-remove-hints": "La rimozione scollegherà il nome utente dalla chiave.",
"ens-remove-username": "Rimuovi nome utente", "ens-remove-username": "Rimuovi nome utente",
"ens-saved": "è ora collegato con la chiave di chat e può essere utilizzato in Status.", "ens-saved": " è ora collegato con la chiave di chat e può essere utilizzato in Status.",
"ens-saved-title": "Nome utente aggiunto", "ens-saved-title": "Nome utente aggiunto",
"ens-show-username": "Mostra il mio nome utente ENS nelle chat", "ens-show-username": "Mostra il mio nome utente ENS nelle chat",
"ens-terms-header": "Termini di registrazione del nome", "ens-terms-header": "Termini di registrazione del nome",

View File

@ -371,7 +371,7 @@
"ens-release-username": "释放用户名", "ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。", "ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名", "ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的聊天码相关联可以在Status中使用了。", "ens-saved": " 现在已与您的聊天码相关联可以在Status中使用了。",
"ens-saved-title": "用户名已添加", "ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名", "ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款", "ens-terms-header": "名称注册条款",

View File

@ -334,7 +334,7 @@
"ens-release-username": "释放用户名", "ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。", "ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名", "ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的密钥相关联可以在Status中使用了。", "ens-saved": " 现在已与您的密钥相关联可以在Status中使用了。",
"ens-saved-title": "用户名已添加", "ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名", "ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款", "ens-terms-header": "名称注册条款",

View File

@ -371,7 +371,7 @@
"ens-release-username": "釋出用戶名稱", "ens-release-username": "釋出用戶名稱",
"ens-remove-hints": "刪除會將用戶名稱從您的金鑰中分離。", "ens-remove-hints": "刪除會將用戶名稱從您的金鑰中分離。",
"ens-remove-username": "刪除用戶名稱", "ens-remove-username": "刪除用戶名稱",
"ens-saved": "現在已與您的聊天金鑰連結,可以在\"Status\"中使用。", "ens-saved": " 現在已與您的聊天金鑰連結,可以在\"Status\"中使用。",
"ens-saved-title": "用戶名已新增", "ens-saved-title": "用戶名已新增",
"ens-show-username": "在聊天中顯示我的ENS用戶名", "ens-show-username": "在聊天中顯示我的ENS用戶名",
"ens-terms-header": "名稱註冊條款", "ens-terms-header": "名稱註冊條款",

View File

@ -312,7 +312,7 @@
"ens-release-username": "释放用户名", "ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。", "ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名", "ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的密钥相关联可以在Status中使用了。", "ens-saved": " 现在已与您的密钥相关联可以在Status中使用了。",
"ens-saved-title": "用户名已添加", "ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名", "ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款", "ens-terms-header": "名称注册条款",