Skip to content

Commit

Permalink
translations + accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
churik committed Apr 22, 2020
1 parent 74f1405 commit 6fd2865
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,25 @@
[react/scroll-view {:keyboard-should-persist-taps :handled}
[react/view styles/edit-bootnode-view
[text-input/text-input-with-label
{:label (i18n/label :t/name)
:placeholder (i18n/label :t/specify-name)
:style styles/input
:container styles/input-container
:default-value name
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :name %])
:auto-focus true}]
{:label (i18n/label :t/name)
:placeholder (i18n/label :t/specify-name)
:accessibility-label :bootnode-name
:style styles/input
:container styles/input-container
:default-value name
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :name %])
:auto-focus true}]
[react/view
{:flex 1}
[text-input/text-input-with-label
(merge
{:label (i18n/label :t/bootnode-address)
:placeholder (i18n/label :t/bootnode-format)
:style styles/input
:container styles/input-container
:default-value url
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :url %])}
{:label (i18n/label :t/bootnode-address)
:placeholder (i18n/label :t/bootnode-format)
:style styles/input
:accessibility-label :bootnode-address
:container styles/input-container
:default-value url
:on-change-text #(re-frame/dispatch [:bootnodes.ui/input-changed :url %])}
(when-not platform/desktop? {:content qr-code}))]
(when (and (not (string/blank? url)) invalid-url?)
[tooltip/tooltip (i18n/label :t/invalid-format
Expand Down
5 changes: 3 additions & 2 deletions src/status_im/ui/screens/bootnodes_settings/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
bootnodes [:custom-bootnodes/network-bootnodes]]
[react/view {:flex 1}
[topbar/topbar {:title :t/bootnodes-settings
:accessories [{:icon :main-icons/add
:handler #(navigate-to-add-bootnode nil)}]}]
:accessories [{:icon :main-icons/add
:accessibility-label :add-bootnode
:handler #(navigate-to-add-bootnode nil)}]}]
[react/view styles/switch-container
[profile.components/settings-switch-item
{:label-kw :t/bootnodes-enabled
Expand Down
29 changes: 20 additions & 9 deletions test/appium/tests/atomic/account_management/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):

@marks.testrail_id(5432)
@marks.medium
@marks.skip
# TODO: e2e blocker 9135: no force-logout after enabling bootnode (enable after fix)
def test_custom_bootnodes(self):
self.create_drivers(2)
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
Expand All @@ -616,15 +614,26 @@ def test_custom_bootnodes(self):

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

profile_1.just_fyi('Add custom bootnode, enable bootnodes and check validation')
profile_1.advanced_button.click()
profile_1.bootnodes_button.click()
profile_1.plus_button.click()
profile_1.specify_name_input.set_value('test')
profile_1.bootnode_address_input.set_value('invalid_bootnode_address')
profile_1.write_page_source_to_file('/Users/curikovatm/Downloads/sobaka1.xml')
# 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.plus_button.is_element_displayed():
# self.errors.append('User was navigated to another screen when tapped on disabled "Save" button')
# profile_1.bootnode_address_input.click()
profile_1.bootnode_address_input.set_value(bootnode_address)
profile_1.save_button.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)
message = 'test message'
chat_1.chat_message_input.send_keys(message)
Expand All @@ -634,18 +643,20 @@ def test_custom_bootnodes(self):
chat_2.chat_element_by_text(message).wait_for_visibility_of_element()
chat_2.add_to_contacts.click()

chat_1.get_back_to_home_view()
home_1.profile_button.click()
profile_1.advanced_button.click()
profile_1.bootnodes_button.click()
profile_1.just_fyi('Disable custom bootnodes')
chat_1.profile_button.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()
message_1 = 'new message'
chat_1.chat_message_input.send_keys(message_1)
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.medium
Expand Down
5 changes: 0 additions & 5 deletions test/appium/views/base_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ def navigate(self):
from views.profile_view import ProfileView
return ProfileView(self.driver)

def click(self):
from views.profile_view import PrivacyAndSecurityButton
self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver))
return self.navigate()


class SaveButton(BaseButton):
def __init__(self, driver):
Expand Down
2 changes: 1 addition & 1 deletion test/appium/views/home_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self, driver):
class SearchChatInput(BaseEditBox):
def __init__(self, driver):
super().__init__(driver)
self.locator = self.Locator.xpath_selector('//android.widget.EditText')
self.locator = self.Locator.text_selector('Search')


class HomeView(BaseView):
Expand Down
2 changes: 1 addition & 1 deletion translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
"ens-release-username": "Liberar nombre de usuario",
"ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.",
"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-show-username": "Mostrar mi nombre de usuario ENS en los chats",
"ens-terms-header": "Términos de registro de nombre",
Expand Down
2 changes: 1 addition & 1 deletion translations/es_419.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
"ens-release-username": "Liberar nombre de usuario",
"ens-remove-hints": "La eliminación separará el nombre de usuario de tu clave.",
"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-show-username": "Mostrar mi nombre de usuario ENS en los chats",
"ens-terms-header": "Términos de registro de nombre",
Expand Down
2 changes: 1 addition & 1 deletion translations/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
"ens-release-username": "Bitawan ang username",
"ens-remove-hints": "Ang pagtanggal ay tatanggalin ang username mula sa iyong susi.",
"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-show-username": "Ipakita ang aking pangalan ng ENS sa mga chat",
"ens-terms-header": "Mga tuntunin ng pagpaparehistro ng pangalan",
Expand Down
2 changes: 1 addition & 1 deletion translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
"ens-release-username": "Nom d'utilisateur libre",
"ens-remove-hints": "La suppression séparera le nom d'utilisateur de votre clé.",
"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-show-username": "Afficher mon nom d'utilisateur ENS dans les chats",
"ens-terms-header": "Conditions d'enregistrement des noms",
Expand Down
2 changes: 1 addition & 1 deletion translations/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
"ens-release-username": "Lepaskan nama pengguna",
"ens-remove-hints": "Menghapus akan melepaskan nama pengguna dari kunci Anda.",
"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-show-username": "Tampilkan nama pengguna ENS saya dalam obrolan",
"ens-terms-header": "Ketentuan registrasi nama",
Expand Down
2 changes: 1 addition & 1 deletion translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
"ens-release-username": "Rilascia nome utente",
"ens-remove-hints": "La rimozione scollegherà il nome utente dalla chiave.",
"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-show-username": "Mostra il mio nome utente ENS nelle chat",
"ens-terms-header": "Termini di registrazione del nome",
Expand Down
2 changes: 1 addition & 1 deletion translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
"ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的聊天码相关联,可以在Status中使用了。",
"ens-saved": " 现在已与您的聊天码相关联,可以在Status中使用了。",
"ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款",
Expand Down
2 changes: 1 addition & 1 deletion translations/zh_Hans_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
"ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的密钥相关联,可以在Status中使用了。",
"ens-saved": " 现在已与您的密钥相关联,可以在Status中使用了。",
"ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款",
Expand Down
2 changes: 1 addition & 1 deletion translations/zh_TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
"ens-release-username": "釋出用戶名稱",
"ens-remove-hints": "刪除會將用戶名稱從您的金鑰中分離。",
"ens-remove-username": "刪除用戶名稱",
"ens-saved": "現在已與您的聊天金鑰連結,可以在\"Status\"中使用。",
"ens-saved": " 現在已與您的聊天金鑰連結,可以在\"Status\"中使用。",
"ens-saved-title": "用戶名已新增",
"ens-show-username": "在聊天中顯示我的ENS用戶名",
"ens-terms-header": "名稱註冊條款",
Expand Down
2 changes: 1 addition & 1 deletion translations/zh_hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"ens-release-username": "释放用户名",
"ens-remove-hints": "删除将从密钥中分离用户名。",
"ens-remove-username": "删除用户名",
"ens-saved": "现在已与您的密钥相关联,可以在Status中使用了。",
"ens-saved": " 现在已与您的密钥相关联,可以在Status中使用了。",
"ens-saved-title": "用户名已添加",
"ens-show-username": "在聊天中显示我的ENS用户名",
"ens-terms-header": "名称注册条款",
Expand Down

0 comments on commit 6fd2865

Please sign in to comment.