Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
tbenr 2018-07-12 21:41:50 +02:00 committed by Julien Eluard
parent 11bb009787
commit 6672400041
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
5 changed files with 10 additions and 10 deletions

View File

@ -200,7 +200,7 @@
:browsing-title "Browse" :browsing-title "Browse"
:browsing-open-in-web-browser "Open in web browser" :browsing-open-in-web-browser "Open in web browser"
:browsing-open-in-browser "Open in browser" :browsing-open-in-status "Open in Status"
:browsing-cancel "Cancel" :browsing-cancel "Cancel"
;;sign-up ;;sign-up

View File

@ -30,7 +30,7 @@
(defn browse [link] (defn browse [link]
(show {:title (i18n/label :t/browsing-title) (show {:title (i18n/label :t/browsing-title)
:options [{:label (i18n/label :t/browsing-open-in-browser) :options [{:label (i18n/label :t/browsing-open-in-status)
:action #(re-frame/dispatch [:open-url-in-browser link])} :action #(re-frame/dispatch [:open-url-in-browser link])}
{:label (i18n/label :t/browsing-open-in-web-browser) {:label (i18n/label :t/browsing-open-in-web-browser)
:action #(.openURL react/linking (http/normalize-url link))}] :action #(.openURL react/linking (http/normalize-url link))}]
@ -38,6 +38,6 @@
(defn browse-dapp [link] (defn browse-dapp [link]
(show {:title (i18n/label :t/browsing-title) (show {:title (i18n/label :t/browsing-title)
:options [{:label (i18n/label :t/browsing-open-in-browser) :options [{:label (i18n/label :t/browsing-open-in-status)
:action #(re-frame/dispatch [:open-url-in-browser link])}] :action #(re-frame/dispatch [:open-url-in-browser link])}]
:cancel-text (i18n/label :t/browsing-cancel)})) :cancel-text (i18n/label :t/browsing-cancel)}))

View File

@ -244,7 +244,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_1.get_back_to_home_view() chat_1.get_back_to_home_view()
chat_2 = home_2.get_chat_with_user(username_1).click() chat_2 = home_2.get_chat_with_user(username_1).click()
chat_2.element_starts_with_text(url_message, 'button').click() chat_2.element_starts_with_text(url_message, 'button').click()
web_view = chat_2.open_in_browser_button.click() web_view = chat_2.open_in_status_button.click()
try: try:
web_view.find_full_text('Status, the Ethereum discovery tool.') web_view.find_full_text('Status, the Ethereum discovery tool.')
except TimeoutException: except TimeoutException:
@ -258,7 +258,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_2.chat_message_input.send_keys(url_message) chat_2.chat_message_input.send_keys(url_message)
chat_2.send_message_button.click() chat_2.send_message_button.click()
chat_1.element_starts_with_text(url_message, 'button').click() chat_1.element_starts_with_text(url_message, 'button').click()
web_view = chat_1.open_in_browser_button.click() web_view = chat_1.open_in_status_button.click()
try: try:
web_view.find_full_text('Status, the Ethereum discovery tool.') web_view.find_full_text('Status, the Ethereum discovery tool.')
except TimeoutException: except TimeoutException:

View File

@ -71,7 +71,7 @@ class TestMessages(MultipleDeviceTestCase):
device_1_chat.wait_for_message_in_one_to_one_chat(url_message, self.errors) device_1_chat.wait_for_message_in_one_to_one_chat(url_message, self.errors)
if device_1_chat.element_by_text(url_message, 'button').is_element_present(): if device_1_chat.element_by_text(url_message, 'button').is_element_present():
device_1_chat.element_by_text(url_message, 'button').click() device_1_chat.element_by_text(url_message, 'button').click()
web_view = device_1_chat.open_in_browser_button.click() web_view = device_1_chat.open_in_status_button.click()
web_view.find_full_text('Status, the Ethereum discovery tool.') web_view.find_full_text('Status, the Ethereum discovery tool.')
device_1_chat.back_button.click() device_1_chat.back_button.click()

View File

@ -129,10 +129,10 @@ class MoreUsersButton(BaseButton):
self.locator = self.Locator.xpath_selector("//android.widget.TextView[contains(@text, 'MORE')]") self.locator = self.Locator.xpath_selector("//android.widget.TextView[contains(@text, 'MORE')]")
class OpenInBrowserButton(BaseButton): class OpenInStatusButton(BaseButton):
def __init__(self, driver): def __init__(self, driver):
super(OpenInBrowserButton, self).__init__(driver) super(OpenInStatusButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector("//*[@text='Open in browser']") self.locator = self.Locator.xpath_selector("//*[@text='Open in Status']")
def navigate(self): def navigate(self):
from views.web_views.base_web_view import BaseWebView from views.web_views.base_web_view import BaseWebView
@ -266,7 +266,7 @@ class ChatView(BaseView):
self.first_recipient_button = FirstRecipient(self.driver) self.first_recipient_button = FirstRecipient(self.driver)
self.open_in_browser_button = OpenInBrowserButton(self.driver) self.open_in_status_button = OpenInStatusButton(self.driver)
# Contact's profile # Contact's profile
self.contact_profile_picture = ProfilePictureElement(self.driver) self.contact_profile_picture = ProfilePictureElement(self.driver)