Update critical autotests
This commit is contained in:
parent
30ab6c159a
commit
ac718de425
|
@ -34,9 +34,8 @@
|
|||
:count-subscription :chats/unread-messages-number
|
||||
:accessibility-label :home-tab-button}
|
||||
{:nav-stack :browser-stack
|
||||
:content {:title (i18n/label :t/dapp)
|
||||
:content {:title (i18n/label :t/dapps)
|
||||
:icon :main-icons/dapp}
|
||||
;;:count-subscription :chats/unread-messages-number
|
||||
:accessibility-label :dapp-tab-button}
|
||||
{:nav-stack :wallet-stack
|
||||
:content {:title (i18n/label :t/wallet)
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
:style (styles/photo 40)}]])
|
||||
;;Title
|
||||
[react/view {:style {:margin-left 16 :flex 1}}
|
||||
[react/text {:style (styles/title small? subtitle)}
|
||||
[react/text {:style (styles/title small? subtitle)
|
||||
:number-of-lines 1
|
||||
:ellipsize-mode :tail}
|
||||
title]
|
||||
;;Subtitle
|
||||
(when subtitle
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[status-im.ui.screens.wallet.components.views :as components]
|
||||
[status-im.ui.components.bottom-bar.styles :as tabs.styles]
|
||||
[status-im.react-native.resources :as resources]
|
||||
[status-im.ui.components.contact.contact :as contact-view])
|
||||
[status-im.ui.components.chat-icon.screen :as chat-icon])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
|
||||
(defn list-item [{:keys [browser-id] :as home-item}]
|
||||
|
@ -23,13 +23,19 @@
|
|||
(re-frame/dispatch [:browser.ui/remove-browser-pressed browser-id]))}
|
||||
[inner-item/home-list-browser-item-inner-view home-item]])
|
||||
|
||||
(defn- render-dapp [{:keys [dapp-url recent?] :as dapp}]
|
||||
(defn- render-dapp [{:keys [dapp-url recent? description name] :as dapp}]
|
||||
(if recent?
|
||||
[list-item dapp]
|
||||
[contact-view/contact-view {:contact dapp
|
||||
:on-press #(re-frame/dispatch [:browser.ui/open-dapp-button-pressed dapp-url])
|
||||
:show-forward? true
|
||||
:accessibility-label :dapp-item}]))
|
||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:browser.ui/open-dapp-button-pressed dapp-url])}
|
||||
[react/view {:style {:padding-top 11 :padding-horizontal 16 :padding-bottom 7 :flex-direction :row}}
|
||||
[chat-icon/contact-icon-contacts-tab dapp]
|
||||
[react/view {:padding-left 16 :padding-right 2 :flex 1}
|
||||
[react/text {:style {:font-size 15 :line-height 22 :font-weight "500"}} name]
|
||||
[react/text {:flex 1}
|
||||
[react/text {:style {:font-size 13 :color "#939BA1" :line-height 18
|
||||
:margin-top 5 :margin-bottom 2}}
|
||||
description]]
|
||||
[react/text {:style {:font-size 12 :color "#4360DF"}} (str dapp-url " ->")]]]]))
|
||||
|
||||
(defn list-header [empty?]
|
||||
[react/view (when empty? {:flex 1})
|
||||
|
@ -67,7 +73,6 @@
|
|||
:data (map #(assoc % :dapp-url (:url %) :recent? true) browsers)}))
|
||||
:key-fn :dapp-url
|
||||
:render-fn render-dapp
|
||||
:default-separator? true
|
||||
:enableEmptySections true
|
||||
:footer [react/view
|
||||
{:style {:height tabs.styles/tabs-diff
|
||||
|
|
|
@ -7,23 +7,16 @@
|
|||
[status-im.chat.commands.receiving :as commands-receiving]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.screens.home.styles :as styles]
|
||||
[status-im.ui.screens.chat.utils :as chat.utils]
|
||||
[status-im.ui.components.styles :as component.styles]
|
||||
[status-im.utils.core :as utils]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.utils.datetime :as time]
|
||||
[status-im.utils.gfycat.core :as gfycat]
|
||||
[status-im.constants :as const]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.components.chat-preview :as chat-preview]
|
||||
[status-im.ui.components.icons.vector-icons :as vector-icons]
|
||||
[status-im.ui.components.chat-icon.screen :as chat-icon.screen]
|
||||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.components.list-item.views :as list-item]
|
||||
[status-im.browser.core :as browser]
|
||||
[clojure.string :as string]
|
||||
[status-im.ui.components.chat-icon.screen :as chat-icon]
|
||||
[status-im.ui.components.bottom-bar.styles :as tabs.styles]))
|
||||
[status-im.ui.components.chat-icon.screen :as chat-icon]))
|
||||
|
||||
(defview command-short-preview [message]
|
||||
(letsubs [id->command [:chats/id->command]
|
||||
|
|
|
@ -59,6 +59,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5390)
|
||||
@marks.high
|
||||
### TO DO: this needs to be updated. Feature changed in PR-7719
|
||||
def test_swipe_to_delete_browser_entry(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home_view = sign_in.create_user()
|
||||
|
@ -76,9 +77,9 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
def test_open_google_com_via_open_dapp(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home = sign_in_view.create_user()
|
||||
start_new_chat = home.plus_button.click()
|
||||
start_new_chat.open_url('google.com')
|
||||
browsing_view = start_new_chat.get_base_web_view()
|
||||
open_dapp_view = home.dapp_tab_button.click()
|
||||
open_dapp_view.open_url('google.com')
|
||||
browsing_view = open_dapp_view.get_base_web_view()
|
||||
browsing_view.element_by_text('Google').wait_for_element(30)
|
||||
|
||||
@marks.testrail_id(5321)
|
||||
|
@ -87,7 +88,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
|||
def test_back_forward_buttons_browsing_website(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.create_user()
|
||||
start_new_chat = home.plus_button.click()
|
||||
start_new_chat = home.dapp_tab_button.click()
|
||||
browsing_view = start_new_chat.open_url('www.wikipedia.org')
|
||||
browsing_view.element_by_text_part('Русский', 'button').click()
|
||||
browsing_view.find_text_part('Избранная статья')
|
||||
|
|
|
@ -104,6 +104,21 @@ class HomeButton(TabButton):
|
|||
return self.navigate()
|
||||
|
||||
|
||||
class DappTabButton(TabButton):
|
||||
def __init__(self, driver):
|
||||
super(DappTabButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('dapp-tab-button')
|
||||
|
||||
def navigate(self):
|
||||
from views.start_new_chat_view import StartNewChatView
|
||||
return StartNewChatView(self.driver)
|
||||
|
||||
def click(self):
|
||||
from views.start_new_chat_view import EnterUrlEditbox
|
||||
self.click_until_presence_of_element(EnterUrlEditbox(self.driver))
|
||||
return self.navigate()
|
||||
|
||||
|
||||
class WalletButton(TabButton):
|
||||
def __init__(self, driver):
|
||||
super(WalletButton, self).__init__(driver)
|
||||
|
@ -268,6 +283,7 @@ class BaseView(object):
|
|||
self.home_button = HomeButton(self.driver)
|
||||
self.wallet_button = WalletButton(self.driver)
|
||||
self.profile_button = ProfileButton(self.driver)
|
||||
self.dapp_tab_button = DappTabButton(self.driver)
|
||||
|
||||
self.yes_button = YesButton(self.driver)
|
||||
self.no_button = NoButton(self.driver)
|
||||
|
|
|
@ -162,12 +162,11 @@ class HomeView(BaseView):
|
|||
profile_view = self.profile_button.click()
|
||||
profile_view.advanced_button.click()
|
||||
profile_view.debug_mode_toggle.click()
|
||||
home_view = profile_view.home_button.click()
|
||||
start_new_chat_view = home_view.plus_button.click()
|
||||
start_new_chat_view.open_d_app_button.click()
|
||||
start_new_chat_view.status_test_dapp_button.scroll_to_element()
|
||||
status_test_dapp = start_new_chat_view.status_test_dapp_button.click()
|
||||
start_new_chat_view.open_button.click()
|
||||
dapp_view = profile_view.dapp_tab_button.click()
|
||||
#dapp_view.open_d_app_button.click()
|
||||
dapp_view.status_test_dapp_button.scroll_to_element()
|
||||
status_test_dapp = dapp_view.status_test_dapp_button.click()
|
||||
#dapp_view.open_button.click()
|
||||
for _ in range(2):
|
||||
if allow_all:
|
||||
status_test_dapp.allow_button.click()
|
||||
|
|
|
@ -92,7 +92,6 @@ class StartNewChatView(ContactsView):
|
|||
return UsernameCheckbox(self.driver, username)
|
||||
|
||||
def open_url(self, url):
|
||||
self.open_d_app_button.click()
|
||||
self.enter_url_editbox.click()
|
||||
self.enter_url_editbox.send_keys(url)
|
||||
self.confirm()
|
||||
|
|
Loading…
Reference in New Issue