Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f6b42c844 | ||
|
|
c53bbc74e1 | ||
|
|
69c49a5557 | ||
|
|
2ed3b50663 | ||
|
|
8dd75205f3 | ||
|
|
081f1a2115 |
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.5.7'
|
||||
library 'status-jenkins-lib@v1.6.0'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -164,16 +164,27 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
|
||||
NSString *networkDirPath = @"ethereum/mainnet_rpc";
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc_dev";
|
||||
#else
|
||||
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc";
|
||||
#endif
|
||||
|
||||
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
|
||||
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
|
||||
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
|
||||
|
||||
NSURL *goerliNetworkDir = [rootUrl URLByAppendingPathComponent:goerliNetworkDirPath];
|
||||
NSURL *goerliGethLogsFile = [goerliNetworkDir URLByAppendingPathComponent:@"geth.log"];
|
||||
NSURL *goerliLogsFile = [logsFolderName URLByAppendingPathComponent:@"goerli_geth.log"];
|
||||
|
||||
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
|
||||
//NSString* gethLogs = StatusgoExportNodeLogs();
|
||||
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
|
||||
[fileManager copyItemAtPath:goerliGethLogsFile.path toPath:goerliLogsFile.path error:nil];
|
||||
|
||||
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
|
||||
[fileManager removeItemAtPath:logsFolderName.path error:nil];
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.3 KiB |
@@ -4,7 +4,7 @@
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.tags.permission-tag :as permission]
|
||||
[quo2.components.tags.filter-tag :as filter-tag]
|
||||
[quo2.components.tags.tag :as tag]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.utils.money :as money]
|
||||
[status-im.i18n.i18n :as i18n]
|
||||
@@ -49,7 +49,7 @@
|
||||
(for [{:keys [id tag-label resource]} tags]
|
||||
^{:key id}
|
||||
[react/view {:margin-right 8}
|
||||
[filter-tag/filter-tag
|
||||
[tag/tag
|
||||
{:id id
|
||||
:size 24
|
||||
:label tag-label
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
(ns quo2.components.info.nfc-prompt
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo.theme :as theme]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im.ui.components.icons.icons :as icons]))
|
||||
|
||||
(defn nfc-prompt
|
||||
[{:keys [prompt-status on-press]}]
|
||||
(let [dark? (theme/dark?)
|
||||
ready? (= :ready prompt-status)
|
||||
connected? (= :connected prompt-status)
|
||||
success? (= :success prompt-status)
|
||||
ready-or-connected? (or ready? connected?)]
|
||||
[rn/view {:style {:height 400
|
||||
:flex-direction "column-reverse"}}
|
||||
[rn/view {:style {:background-color (if dark?
|
||||
colors/dark-prompt-bg
|
||||
colors/white)
|
||||
:width "100%"
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:height "100%"}}
|
||||
[rn/view {:style (cond-> {:flex-direction :row
|
||||
:justify-content :center
|
||||
:align-items :center}
|
||||
success? (assoc :display :none))}
|
||||
[rn/text {:style {:font-size 26
|
||||
:font-weight "400"
|
||||
:color (if dark?
|
||||
colors/dark-prompt-title
|
||||
colors/light-prompt-title)
|
||||
:line-height 31
|
||||
:text-align :center}}
|
||||
"Ready to Scan"]]
|
||||
[rn/view {:style {:justify-content :center
|
||||
:align-items :center
|
||||
:margin-top 29}}
|
||||
[icons/icon (if success?
|
||||
:main-icons/nfc-prompt-success
|
||||
(when ready-or-connected?
|
||||
:main-icons/nfc-prompt))
|
||||
{:width 114
|
||||
:color "nil"
|
||||
:height 114}]
|
||||
[rn/view {:style {:width 291
|
||||
:height 95
|
||||
:justify-content :center
|
||||
:align-items :center}}
|
||||
[rn/text {:style {:font-size 16
|
||||
:font-weight "400"
|
||||
:color (if dark?
|
||||
colors/white
|
||||
colors/neutral-95)
|
||||
:line-height 20}}
|
||||
(if success?
|
||||
"Success"
|
||||
(if (= :ready prompt-status)
|
||||
"Hold your iPhone near a Status Keycard"
|
||||
"Connected. Don’t move your card."))]]
|
||||
[rn/touchable-opacity {:style (cond-> {:padding-vertical 18
|
||||
:padding-horizontal 10
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:width 291
|
||||
:border-radius 10
|
||||
:background-color (if dark?
|
||||
colors/dark-prompt-button
|
||||
colors/light-prompt-button)
|
||||
:height 52}
|
||||
success? (assoc :display :none))
|
||||
:on-press (fn [] on-press)}
|
||||
[rn/text {:style {:color (if dark?
|
||||
colors/white
|
||||
colors/neutral-95)}}
|
||||
"Cancel"]]]]]))
|
||||
@@ -1,80 +0,0 @@
|
||||
(ns quo2.components.tags.filter-tag
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[quo.theme :as theme]
|
||||
[quo.react-native :as rn]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.components.tags.base-tag :as base-tag]))
|
||||
|
||||
(def themes {:light {:default {:border-color colors/neutral-20
|
||||
:blurred-border-color colors/neutral-80-opa-5
|
||||
:text-color {:style {:color colors/neutral-100}}}
|
||||
:active {:border-color colors/neutral-30
|
||||
:blurred-border-color colors/neutral-80-opa-10
|
||||
:text-color {:style {:color colors/neutral-100}}}
|
||||
:disabled {:border-color colors/neutral-20
|
||||
:blurred-border-color colors/neutral-80-opa-5
|
||||
:text-color {:style {:color colors/neutral-100}}}}
|
||||
:dark {:default {:border-color colors/neutral-70
|
||||
:blurred-border-color colors/white-opa-10
|
||||
:text-color {:style {:color colors/white}}}
|
||||
:active {:border-color colors/neutral-60
|
||||
:blurred-border-color colors/white-opa-20
|
||||
:text-color {:style {:color colors/white}}}
|
||||
:disabled {:border-color colors/neutral-70
|
||||
:blurred-border-color colors/white-opa-10
|
||||
:text-color {:style {:color colors/white}}}}})
|
||||
|
||||
(defn tag-resources [size type resource icon-color label text-color labelled]
|
||||
[rn/view {:style (merge {:flex-direction :row
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
(when label
|
||||
{:padding-horizontal (case size 32 12 24 8)}))}
|
||||
(when (= type :icon)
|
||||
[icons/icon resource {:container-style (when label
|
||||
{:margin-right 4})
|
||||
:resize-mode :center
|
||||
:size (case size
|
||||
32 20
|
||||
24 12)
|
||||
:color icon-color}])
|
||||
(when (= type :emoji)
|
||||
[rn/image {:source resource
|
||||
:style (merge (case size
|
||||
32 {:height 20
|
||||
:width 20}
|
||||
24 {:height 12
|
||||
:width 12})
|
||||
(when label
|
||||
{:margin-right 4}))}])
|
||||
(when labelled
|
||||
[text/text (merge {:size (case size
|
||||
32 :paragraph-1
|
||||
24 :paragraph-2
|
||||
20 :label nil)
|
||||
:weight :medium
|
||||
:number-of-lines 1}
|
||||
text-color)
|
||||
label])])
|
||||
|
||||
(defn filter-tag
|
||||
[_ _]
|
||||
(fn [{:keys [id on-press disabled size resource active accessibility-label
|
||||
label type labelled blurred icon-color] :or {size 32}}]
|
||||
(let [state (cond disabled :disabled active :active :else :default)
|
||||
{:keys [border-color blurred-border-color text-color]}
|
||||
(get-in themes [(theme/get-theme) state])]
|
||||
[base-tag/base-tag {:id id
|
||||
:size size
|
||||
:border-width 1
|
||||
:border-color (if blurred
|
||||
blurred-border-color
|
||||
border-color)
|
||||
:on-press on-press
|
||||
:accessibility-label accessibility-label
|
||||
:disabled disabled
|
||||
:type type
|
||||
:label label}
|
||||
[tag-resources size type resource icon-color label text-color labelled]])))
|
||||
|
||||
@@ -1,51 +1,80 @@
|
||||
(ns quo2.components.tags.tag
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo2.foundations.colors :as colors]
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[quo.theme :as theme]
|
||||
[quo2.components.markdown.text :as text]))
|
||||
[quo.react-native :as rn]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.components.tags.base-tag :as base-tag]))
|
||||
|
||||
(def themes {:light {:background-color colors/neutral-20}
|
||||
:dark {:background-color colors/neutral-80}})
|
||||
(def themes {:light {:default {:border-color colors/neutral-20
|
||||
:blurred-border-color colors/neutral-80-opa-5
|
||||
:text-color {:style {:color colors/neutral-100}}}
|
||||
:active {:border-color colors/neutral-30
|
||||
:blurred-border-color colors/neutral-80-opa-10
|
||||
:text-color {:style {:color colors/neutral-100}}}
|
||||
:disabled {:border-color colors/neutral-20
|
||||
:blurred-border-color colors/neutral-80-opa-5
|
||||
:text-color {:style {:color colors/neutral-100}}}}
|
||||
:dark {:default {:border-color colors/neutral-70
|
||||
:blurred-border-color colors/white-opa-10
|
||||
:text-color {:style {:color colors/white}}}
|
||||
:active {:border-color colors/neutral-60
|
||||
:blurred-border-color colors/white-opa-20
|
||||
:text-color {:style {:color colors/white}}}
|
||||
:disabled {:border-color colors/neutral-70
|
||||
:blurred-border-color colors/white-opa-10
|
||||
:text-color {:style {:color colors/white}}}}})
|
||||
|
||||
(defn get-value-from-size [size big-option small-option]
|
||||
(if (= size :big) big-option small-option))
|
||||
(defn tag-resources [size type resource icon-color label text-color labelled]
|
||||
[rn/view {:style (merge {:flex-direction :row
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
(when label
|
||||
{:padding-horizontal (case size 32 12 24 8)}))}
|
||||
(when (= type :icon)
|
||||
[icons/icon resource {:container-style (when label
|
||||
{:margin-right 4})
|
||||
:resize-mode :center
|
||||
:size (case size
|
||||
32 20
|
||||
24 12)
|
||||
:color icon-color}])
|
||||
(when (= type :emoji)
|
||||
[rn/image {:source resource
|
||||
:style (merge (case size
|
||||
32 {:height 20
|
||||
:width 20}
|
||||
24 {:height 12
|
||||
:width 12})
|
||||
(when label
|
||||
{:margin-right 4}))}])
|
||||
(when labelled
|
||||
[text/text (merge {:size (case size
|
||||
32 :paragraph-1
|
||||
24 :paragraph-2
|
||||
20 :label nil)
|
||||
:weight :medium
|
||||
:number-of-lines 1}
|
||||
text-color)
|
||||
label])])
|
||||
|
||||
(defn tag-container [size]
|
||||
{:height (get-value-from-size size 32 24)
|
||||
:align-items :center
|
||||
:flex-direction :row
|
||||
:border-radius 20})
|
||||
|
||||
(defn tag "[tag opts \"label\"]]
|
||||
opts
|
||||
{
|
||||
:size :small/:big
|
||||
:token-img-src :token-img-src
|
||||
:token-img-style {}
|
||||
:border-color :color
|
||||
:overlay child-elements
|
||||
}"
|
||||
(defn tag
|
||||
[_ _]
|
||||
(fn [{:keys [size token-img-src token-img-style border-color overlay]
|
||||
:or {size :small}} label]
|
||||
[rn/view
|
||||
{:style (when border-color
|
||||
{:border-color border-color
|
||||
:border-radius 20
|
||||
:border-width 1})}
|
||||
[rn/view
|
||||
{:style (merge (tag-container size) (get themes (theme/get-theme)))}
|
||||
[rn/image
|
||||
{:source token-img-src
|
||||
:style (merge
|
||||
{:height (get-value-from-size size 28 20)
|
||||
:width (get-value-from-size size 28 20)
|
||||
:margin-left 2
|
||||
:margin-right (get-value-from-size size 8 6)} token-img-style)}]
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:number-of-lines 1
|
||||
:style
|
||||
{:margin-right (get-value-from-size size 12 11)}
|
||||
:size (get-value-from-size size :paragraph-2 :label)} label]
|
||||
overlay]]))
|
||||
(fn [{:keys [id on-press disabled size resource active accessibility-label
|
||||
label type labelled blurred icon-color] :or {size 32}}]
|
||||
(let [state (cond disabled :disabled active :active :else :default)
|
||||
{:keys [border-color blurred-border-color text-color]}
|
||||
(get-in themes [(theme/get-theme) state])]
|
||||
[base-tag/base-tag {:id id
|
||||
:size size
|
||||
:border-width 1
|
||||
:border-color (if blurred
|
||||
blurred-border-color
|
||||
border-color)
|
||||
:on-press on-press
|
||||
:accessibility-label accessibility-label
|
||||
:disabled disabled
|
||||
:type type
|
||||
:label label}
|
||||
[tag-resources size type resource icon-color label text-color labelled]])))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns quo2.components.tags.filter-tags
|
||||
(ns quo2.components.tags.tags
|
||||
(:require [reagent.core :as reagent]
|
||||
[quo.react-native :as rn]
|
||||
[quo2.components.tags.filter-tag :as tag]))
|
||||
[quo2.components.tags.tag :as tag]))
|
||||
|
||||
(defn tags [{:keys [default-active on-change]}]
|
||||
(let [active-tab-id (reagent/atom default-active)]
|
||||
@@ -11,7 +11,7 @@
|
||||
(for [{:keys [tag-label id resource]} data]
|
||||
^{:key id}
|
||||
[rn/view {:margin-right 8}
|
||||
[tag/filter-tag
|
||||
[tag/tag
|
||||
(merge {:id id
|
||||
:size size
|
||||
:type type
|
||||
@@ -2,9 +2,13 @@
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[quo.react-native :as rn]
|
||||
[quo.theme :as theme]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[quo2.components.tags.tag :as tag]))
|
||||
|
||||
(def themes {:light {:background-color colors/neutral-20}
|
||||
:dark {:background-color colors/neutral-80}})
|
||||
|
||||
(defn get-value-from-size [size big-option small-option]
|
||||
(if (= size :big) big-option small-option))
|
||||
|
||||
@@ -16,6 +20,46 @@
|
||||
:border-radius 20
|
||||
:margin-left 2})
|
||||
|
||||
(defn tag-container [size]
|
||||
{:height (get-value-from-size size 32 24)
|
||||
:align-items :center
|
||||
:flex-direction :row
|
||||
:border-radius 20})
|
||||
|
||||
(defn tag "[tag opts \"label\"]]
|
||||
opts
|
||||
{
|
||||
:size :small/:big
|
||||
:token-img-src :token-img-src
|
||||
:token-img-style {}
|
||||
:border-color :color
|
||||
:overlay child-elements
|
||||
}"
|
||||
[_ _]
|
||||
(fn [{:keys [size token-img-src token-img-style border-color overlay]
|
||||
:or {size :small}} label]
|
||||
[rn/view
|
||||
{:style (when border-color
|
||||
{:border-color border-color
|
||||
:border-radius 20
|
||||
:border-width 1})}
|
||||
[rn/view
|
||||
{:style (merge (tag-container size) (get themes (theme/get-theme)))}
|
||||
[rn/image
|
||||
{:source token-img-src
|
||||
:style (merge
|
||||
{:height (get-value-from-size size 28 20)
|
||||
:width (get-value-from-size size 28 20)
|
||||
:margin-left 2
|
||||
:margin-right (get-value-from-size size 8 6)} token-img-style)}]
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:number-of-lines 1
|
||||
:style
|
||||
{:margin-right (get-value-from-size size 12 11)}
|
||||
:size (get-value-from-size size :paragraph-2 :label)} label]
|
||||
overlay]]))
|
||||
|
||||
(defn token-tag
|
||||
"[token-tag opts]
|
||||
opts
|
||||
|
||||
@@ -188,12 +188,6 @@
|
||||
(let [theme (or override-theme (theme/get-theme))]
|
||||
(if (= theme :light) light dark))))
|
||||
|
||||
(def dark-prompt-bg "#1C1C1E")
|
||||
(def dark-prompt-title "#9F9FA5")
|
||||
(def dark-prompt-button "#8E8E93")
|
||||
(def light-prompt-title "#8F8E94")
|
||||
(def light-prompt-button "#D5D4DB")
|
||||
|
||||
(defn dark?
|
||||
[]
|
||||
(theme/dark?))
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
(ns quo2.screens.info.nfc-prompt
|
||||
(:require [quo.react-native :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[quo.previews.preview :as preview]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.info.nfc-prompt :as quo2]))
|
||||
|
||||
(def descriptor [{:label "Prompt status"
|
||||
:key :prompt-status
|
||||
:type :select
|
||||
:options [{:key :ready
|
||||
:value "Ready"}
|
||||
{:key :connected
|
||||
:value "Connected"}
|
||||
{:key :success
|
||||
:value "Success"}]}])
|
||||
|
||||
(defn cool-preview []
|
||||
(let [state (reagent/atom {:on-press identity
|
||||
:prompt-status :ready})]
|
||||
(fn []
|
||||
[rn/view {:margin-bottom 50
|
||||
:padding-vertical 16}
|
||||
[preview/customizer state descriptor]
|
||||
[quo2/nfc-prompt @state]])))
|
||||
|
||||
(defn preview-nfc-prompt []
|
||||
[rn/view {:background-color (colors/theme-colors colors/white colors/neutral-90)
|
||||
:flex 1}
|
||||
[rn/flat-list {:flex 1
|
||||
:keyboardShouldPersistTaps :always
|
||||
:header [cool-preview]
|
||||
:key-fn str}]])
|
||||
@@ -36,14 +36,13 @@
|
||||
[quo2.screens.tabs.segmented-tab :as segmented]
|
||||
[quo2.screens.tabs.tabs :as tabs]
|
||||
[quo2.screens.tags.context-tags :as context-tags]
|
||||
[quo2.screens.tags.filter-tags :as filter-tags]
|
||||
[quo2.screens.tags.tags :as tags]
|
||||
[quo2.screens.tags.permission-tag :as permission-tag]
|
||||
[quo2.screens.tags.status-tags :as status-tags]
|
||||
[quo2.screens.tags.token-tag :as token-tag]
|
||||
[quo2.screens.wallet.token-overview :as token-overview]
|
||||
[quo2.screens.wallet.network-breakdown :as network-breakdown]
|
||||
[quo2.screens.wallet.network-amount :as network-amount]
|
||||
[quo2.screens.info.nfc-prompt :as nfc-prompt]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(def screens-categories
|
||||
@@ -85,10 +84,7 @@
|
||||
:component info-message/preview-info-message}
|
||||
{:name :information-box
|
||||
:insets {:top false}
|
||||
:component information-box/preview-information-box}
|
||||
{:name :nfc-prompt
|
||||
:insets {:top false}
|
||||
:component nfc-prompt/preview-nfc-prompt}]
|
||||
:component information-box/preview-information-box}]
|
||||
:list-items [{:name :channel
|
||||
:insets {:top false}
|
||||
:component channel/preview-channel}
|
||||
@@ -134,9 +130,9 @@
|
||||
:tags [{:name :context-tags
|
||||
:insets {:top false}
|
||||
:component context-tags/preview-context-tags}
|
||||
{:name :filter-tags
|
||||
{:name :tags
|
||||
:insets {:top false}
|
||||
:component filter-tags/preview-filter-tags}
|
||||
:component tags/preview-tags}
|
||||
{:name :permission-tag
|
||||
:insets {:top false}
|
||||
:component permission-tag/preview-permission-tag}
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
(defn preview-permission-tag []
|
||||
[rn/view {:background-color (colors/theme-colors
|
||||
colors/white
|
||||
colors/neutral-80)
|
||||
colors/neutral-90)
|
||||
:flex 1}
|
||||
[rn/flat-list {:flex 1
|
||||
:keyboardShouldPersistTaps :always
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
(ns quo2.screens.tags.filter-tags
|
||||
(ns quo2.screens.tags.tags
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo.previews.preview :as preview]
|
||||
[status-im.ui.components.react :as react]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.tags.filter-tags :as quo2.tags]
|
||||
[quo2.components.tags.tags :as tags]
|
||||
[status-im.react-native.resources :as resources]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
@@ -70,15 +70,15 @@
|
||||
:align-items :center
|
||||
:position :absolute
|
||||
:padding-horizontal 10}
|
||||
[quo2.tags/tags (merge @state
|
||||
{:default-active 1
|
||||
:data [{:id 1 :tag-label "Music" :resource (resources/get-image :music)}
|
||||
{:id 2 :tag-label "Lifestyle" :resource (resources/get-image :lifestyle)}
|
||||
{:id 3 :tag-label "Podcasts" :resource (resources/get-image :podcasts)}]})]]]]])))
|
||||
(defn preview-filter-tags []
|
||||
[tags/tags (merge @state
|
||||
{:default-active 1
|
||||
:data [{:id 1 :tag-label "Music" :resource (resources/get-image :music)}
|
||||
{:id 2 :tag-label "Lifestyle" :resource (resources/get-image :lifestyle)}
|
||||
{:id 3 :tag-label "Podcasts" :resource (resources/get-image :podcasts)}]})]]]]])))
|
||||
(defn preview-tags []
|
||||
[rn/view {:flex 1
|
||||
:background-color (colors/theme-colors
|
||||
colors/neutral-5
|
||||
colors/white
|
||||
colors/neutral-90)}
|
||||
[rn/flat-list {:flex 1
|
||||
:keyboardShouldPersistTaps :always
|
||||
@@ -5,12 +5,15 @@
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.wallet.core :as wallet]
|
||||
["@react-native-community/netinfo" :default net-info]
|
||||
[taoensso.timbre :as log]))
|
||||
[taoensso.timbre :as log]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(fx/defn change-network-status
|
||||
[{:keys [db] :as cofx} is-connected?]
|
||||
[{:keys [db] :as cofx} is-connected? reconnected?]
|
||||
(fx/merge cofx
|
||||
{:db (assoc db :network-status (if is-connected? :online :offline))}
|
||||
(cond-> {:db (assoc db :network-status (if is-connected? :online :offline))}
|
||||
reconnected? (assoc :dispatch-later [{:dispatch [:wallet-connect-legacy/get-connector-session-from-db]
|
||||
:ms 1500}]))
|
||||
(when (and is-connected?
|
||||
(or (not= (count (get-in db [:wallet :accounts]))
|
||||
(count (get db :multiaccount/accounts)))
|
||||
@@ -26,29 +29,39 @@
|
||||
|
||||
(fx/defn handle-network-info-change
|
||||
{:events [::network-info-changed]}
|
||||
[{:keys [db] :as cofx} {:keys [isConnected type details] :as state}]
|
||||
[{:keys [db] :as cofx} {:keys [isConnected type details isInternetReachable app-went-offline?] :as state}]
|
||||
(let [old-network-status (:network-status db)
|
||||
old-network-type (:network/type db)
|
||||
connectivity-status (if isConnected :online :offline)
|
||||
status-changed? (= connectivity-status old-network-status)
|
||||
type-changed? (= type old-network-type)]
|
||||
status-changed? (not= connectivity-status old-network-status)
|
||||
type-changed? (= type old-network-type)
|
||||
_ (when (and (not isConnected)
|
||||
(not isInternetReachable)
|
||||
(not @app-went-offline?))
|
||||
(swap! app-went-offline? not))
|
||||
reconnected? (when (and isInternetReachable
|
||||
@app-went-offline?)
|
||||
(swap! app-went-offline? not)
|
||||
true)]
|
||||
(log/debug "[net-info]"
|
||||
"old-network-status" old-network-status
|
||||
"old-network-type" old-network-type
|
||||
"old-network-status" old-network-status
|
||||
"old-network-type" old-network-type
|
||||
"connectivity-status" connectivity-status
|
||||
"type" type
|
||||
"details" details)
|
||||
"type" type
|
||||
"details" details)
|
||||
(fx/merge cofx
|
||||
(when-not status-changed?
|
||||
(change-network-status isConnected))
|
||||
(when (or status-changed? reconnected?)
|
||||
(change-network-status isConnected reconnected?))
|
||||
(when-not type-changed?
|
||||
(change-network-type old-network-type type (:is-connection-expensive details))))))
|
||||
|
||||
(defn add-net-info-listener []
|
||||
(when net-info
|
||||
(.addEventListener ^js net-info
|
||||
#(re-frame/dispatch [::network-info-changed
|
||||
(js->clj % :keywordize-keys true)]))))
|
||||
(let [app-went-offline? (reagent/atom false)]
|
||||
(when net-info
|
||||
(.addEventListener ^js net-info
|
||||
#(re-frame/dispatch [::network-info-changed
|
||||
(-> (js->clj % :keywordize-keys true)
|
||||
(assoc :app-went-offline? app-went-offline?))])))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::listen-to-network-info
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
[quo2.components.markdown.text :as quo2.text]
|
||||
[quo2.components.buttons.button :as quo2.button]
|
||||
[quo2.components.counter.counter :as quo2.counter]
|
||||
[quo2.components.tags.filter-tags :as filter-tags]
|
||||
[quo2.components.tags.filter-tag :as filter-tag]
|
||||
[quo2.components.tags.tags :as tags]
|
||||
[quo2.foundations.colors :as quo2.colors]
|
||||
[quo.components.safe-area :as safe-area]
|
||||
[quo2.components.tabs.tabs :as quo2.tabs]
|
||||
@@ -188,20 +187,12 @@
|
||||
:padding-top 4
|
||||
:padding-bottom 12
|
||||
:padding-horizontal 20}
|
||||
[react/view {:flex-direction :row}
|
||||
[react/view {:margin-right 8}
|
||||
[filter-tag/filter-tag {:resource :main-icons2/search
|
||||
:labelled false
|
||||
:type :icon
|
||||
:icon-color (quo2.colors/theme-colors
|
||||
quo2.colors/neutral-100
|
||||
quo2.colors/white)}]]
|
||||
[filter-tags/tags {:data filters
|
||||
:labelled true
|
||||
:type :emoji
|
||||
:icon-color (quo2.colors/theme-colors
|
||||
quo2.colors/neutral-50
|
||||
quo2.colors/neutral-40)}]]]))
|
||||
[tags/tags {:data filters
|
||||
:labelled true
|
||||
:type :emoji
|
||||
:icon-color (quo2.colors/theme-colors
|
||||
quo2.colors/neutral-50
|
||||
quo2.colors/neutral-40)}]]))
|
||||
|
||||
(defn communities-list []
|
||||
(let [multiaccount (<sub [:multiaccount])
|
||||
|
||||
@@ -6,17 +6,29 @@
|
||||
[quo.core :as quo]
|
||||
[quo.design-system.colors :as colors]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.utils.utils :as utils]))
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.ui.screens.wallet-connect.session-proposal.views :refer [app-management-sheet-view]]
|
||||
[status-im.ui.components.bottom-panel.views :as bottom-panel]
|
||||
[status-im.utils.handlers :refer [<sub]]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn print-session-info [session]
|
||||
(let [peer-meta (get-in session [:params 0 :peerMeta])
|
||||
peer-id (get-in session [:params 0 :peerId])
|
||||
name (get peer-meta :name)
|
||||
url (get peer-meta :url)
|
||||
account (get-in session [:params 0 :accounts 0])
|
||||
icons (get peer-meta :icons)
|
||||
icon-uri (first (status-im.utils.utils/exclude-svg-resources icons))
|
||||
visible-accounts @(re-frame/subscribe [:visible-accounts-without-watch-only])
|
||||
(defn account-selector-bottom-sheet [{:keys [session show-account-selector? idx]}]
|
||||
(when @show-account-selector?
|
||||
[rn/view {:style (cond-> {:height 50}
|
||||
(= idx 0) (assoc :margin-top 50))}
|
||||
[bottom-panel/animated-bottom-panel
|
||||
session
|
||||
app-management-sheet-view
|
||||
true]]))
|
||||
|
||||
(defn print-session-info [{:keys [session visible-accounts show-account-selector?]}]
|
||||
(let [peer-meta (get-in session [:params 0 :peerMeta])
|
||||
peer-id (get-in session [:params 0 :peerId])
|
||||
name (get peer-meta :name)
|
||||
url (get peer-meta :url)
|
||||
account (get-in session [:params 0 :accounts 0])
|
||||
icons (get peer-meta :icons)
|
||||
icon-uri (first (status-im.utils.utils/exclude-svg-resources icons))
|
||||
selected-account (first (filter
|
||||
#(= account
|
||||
(:address %))
|
||||
@@ -25,28 +37,51 @@
|
||||
[rn/view
|
||||
[:<>
|
||||
[rn/view {:style styles/app-row}
|
||||
[react/image {:style styles/dapp-icon :source {:uri icon-uri}}]
|
||||
[react/image {:style styles/dapp-icon
|
||||
:source {:uri icon-uri}}]
|
||||
[rn/view {:style styles/app-column}
|
||||
[quo/text {:style styles/dapp-name} name]
|
||||
[quo/text {:style styles/dapp-url} url]]
|
||||
|
||||
[rn/view {:flex-direction :row
|
||||
:position :absolute
|
||||
:right 10
|
||||
:align-items :center}
|
||||
[rn/touchable-opacity {:style styles/delete-icon-container
|
||||
:position :absolute
|
||||
:right 10
|
||||
:align-items :center}
|
||||
[rn/touchable-opacity {:style styles/delete-icon-container
|
||||
:on-press #(re-frame/dispatch [:wallet-connect-legacy/disconnect session])}
|
||||
|
||||
[icons/icon :icons/delete {:width 20
|
||||
:height 20
|
||||
[icons/icon :icons/delete {:width 20
|
||||
:height 20
|
||||
:container-style {:elevation 3}
|
||||
:color colors/red}]]
|
||||
|
||||
:color colors/red}]]
|
||||
(when selected-account ;; The account might not be available in theory, if deleted
|
||||
[rn/view {:style (styles/selected-account-container (:color selected-account))}
|
||||
[rn/touchable-opacity {:style (styles/selected-account-container (:color selected-account))
|
||||
:on-press #(swap! show-account-selector? not)}
|
||||
[rn/text {:style styles/selected-account} (:name selected-account)]])]]]]))
|
||||
|
||||
(defn list-item [{:keys [session visible-accounts show-account-selector?]} idx]
|
||||
[rn/view
|
||||
[print-session-info {:session session
|
||||
:visible-accounts visible-accounts
|
||||
:show-account-selector? show-account-selector?}]
|
||||
[account-selector-bottom-sheet {:session session
|
||||
:show-account-selector? show-account-selector?
|
||||
:idx idx}]])
|
||||
|
||||
(defn list-comp [sessions visible-accounts]
|
||||
(let [items (reagent/atom (doall (map (fn [session]
|
||||
(let [show-account-selector? (reagent/atom false)]
|
||||
{:visible-accounts visible-accounts
|
||||
:show-account-selector? show-account-selector?
|
||||
:session session}))
|
||||
@sessions)))]
|
||||
[rn/flat-list {:flex 1
|
||||
:keyboardShouldPersistTaps :always
|
||||
:data @items
|
||||
:render-fn list-item
|
||||
:key-fn str}]))
|
||||
|
||||
(defn views []
|
||||
(let [legacy-sessions @(re-frame/subscribe [:wallet-connect-legacy/sessions])]
|
||||
[rn/view {:margin-top 10}
|
||||
(doall (map print-session-info legacy-sessions))]))
|
||||
(let [sessions (reagent/atom (<sub [:wallet-connect-legacy/sessions]))
|
||||
visible-accounts (<sub [:visible-accounts-without-watch-only])]
|
||||
[list-comp sessions visible-accounts]))
|
||||
|
||||
@@ -142,31 +142,41 @@
|
||||
(:wallet-connect-legacy/sessions db))]
|
||||
{:wc-1-clean-up-sessions connectors}))
|
||||
|
||||
(fx/defn session-connected
|
||||
{:events [:wallet-connect-legacy/created]}
|
||||
[{:keys [db]} session]
|
||||
(let [connector (get db :wallet-connect-legacy/proposal-connector)
|
||||
session (assoc (types/js->clj session)
|
||||
:wc-version constants/wallet-connect-version-1
|
||||
:connector connector)
|
||||
info (.stringify js/JSON (.-session connector))
|
||||
peer-id (get-in session [:params 0 :peerId])
|
||||
dapp-name (get-in session [:params 0 :peerMeta :name])
|
||||
dapp-url (get-in session [:params 0 :peerMeta :url])]
|
||||
{:show-wallet-connect-success-sheet nil
|
||||
:db (-> db
|
||||
(assoc :wallet-connect/session-connected session)
|
||||
(update :wallet-connect-legacy/sessions
|
||||
conj
|
||||
session))
|
||||
::json-rpc/call [{:method "wakuext_addWalletConnectSession"
|
||||
(fx/defn save-session
|
||||
{:events [:wallet-connect-legacy/save-session]}
|
||||
[{:keys [db]} {:keys [peer-id dapp-name dapp-url connector]}]
|
||||
(let [info (.stringify js/JSON (.-session connector))]
|
||||
{::json-rpc/call [{:method "wakuext_addWalletConnectSession"
|
||||
:params [{:id peer-id
|
||||
:info info
|
||||
;; info will be the updated value
|
||||
:dappName dapp-name
|
||||
:dappUrl dapp-url}]
|
||||
:on-success #(log/info "wakuext_addWalletConnectSession success call back , data =>" %)
|
||||
:on-error #(log/error "wakuext_addWalletConnectSession error call back , data =>" %)}]}))
|
||||
|
||||
(fx/defn session-connected
|
||||
{:events [:wallet-connect-legacy/created]}
|
||||
[{:keys [db] :as cofx} session]
|
||||
(let [connector (get db :wallet-connect-legacy/proposal-connector)
|
||||
session (assoc (types/js->clj session)
|
||||
:wc-version constants/wallet-connect-version-1
|
||||
:connector connector)
|
||||
peer-id (get-in session [:params 0 :peerId])
|
||||
dapp-name (get-in session [:params 0 :peerMeta :name])
|
||||
dapp-url (get-in session [:params 0 :peerMeta :url])]
|
||||
(fx/merge cofx
|
||||
{:db (-> db
|
||||
(assoc :wallet-connect/session-connected session)
|
||||
(update :wallet-connect-legacy/sessions
|
||||
conj
|
||||
session))
|
||||
:show-wallet-connect-success-sheet nil}
|
||||
(save-session {:peer-id peer-id
|
||||
:dapp-name dapp-name
|
||||
:dapp-url dapp-url
|
||||
:connector connector}))))
|
||||
|
||||
(fx/defn manage-app
|
||||
{:events [:wallet-connect-legacy/manage-app]}
|
||||
[{:keys [db]} session]
|
||||
@@ -211,16 +221,20 @@
|
||||
|
||||
(fx/defn change-session-account
|
||||
{:events [:wallet-connect-legacy/change-session-account]}
|
||||
[{:keys [db]} session account]
|
||||
(let [connector (:connector session)
|
||||
address (:address account)
|
||||
networks (get db :networks/networks)
|
||||
[{:keys [db] :as cofx} session account]
|
||||
(let [connector (:connector session)
|
||||
address (:address account)
|
||||
networks (get db :networks/networks)
|
||||
current-network-id (get db :networks/current-network)
|
||||
current-network (get networks current-network-id)
|
||||
chain-id (get-in current-network [:config :NetworkId])]
|
||||
{:hide-wallet-connect-app-management-sheet nil
|
||||
:wc-1-update-session [connector chain-id address]
|
||||
:db (assoc db :wallet-connect/showing-app-management-sheet? false)}))
|
||||
current-network (get networks current-network-id)
|
||||
dapp-name (get-in session [:params 0 :peerMeta :name])
|
||||
dapp-url (get-in session [:params 0 :peerMeta :url])
|
||||
peer-id (get-in session [:params 0 :peerId])
|
||||
chain-id (get-in current-network [:config :NetworkId])]
|
||||
(fx/merge cofx
|
||||
{:hide-wallet-connect-app-management-sheet nil
|
||||
:wc-1-update-session [connector chain-id address]
|
||||
:db (assoc db :wallet-connect/showing-app-management-sheet? false)})))
|
||||
|
||||
(fx/defn disconnect-by-peer-id
|
||||
{:events [:wallet-connect-legacy/disconnect-by-peer-id]}
|
||||
@@ -268,10 +282,18 @@
|
||||
(let [sessions (get db :wallet-connect-legacy/sessions)
|
||||
accounts-new (:accounts (first (:params payload)))
|
||||
session (first (filter #(= (:connector %) connector) sessions))
|
||||
updated-session (assoc-in session [:params 0 :accounts] accounts-new)]
|
||||
{:db (-> db
|
||||
(assoc :wallet-connect-legacy/sessions (conj (filter #(not= (:connector %) connector) sessions) updated-session))
|
||||
(dissoc :wallet-connect/session-managed))}))
|
||||
updated-session (assoc-in session [:params 0 :accounts] accounts-new)
|
||||
peer-id (get-in updated-session [:params 0 :peerId])
|
||||
dapp-name (get-in updated-session [:params 0 :peerMeta :name])
|
||||
dapp-url (get-in updated-session [:params 0 :peerMeta :url])]
|
||||
(fx/merge cofx
|
||||
{:db (-> db
|
||||
(assoc :wallet-connect-legacy/sessions (conj (filter #(not= (:connector %) connector) sessions) updated-session))
|
||||
(dissoc :wallet-connect/session-managed))
|
||||
:dispatch [:wallet-connect-legacy/save-session {:peer-id peer-id
|
||||
:dapp-url dapp-url
|
||||
:dapp-name dapp-name
|
||||
:connector connector}]})))
|
||||
|
||||
(fx/defn wallet-connect-legacy-complete-transaction
|
||||
{:events [:wallet-connect-legacy.dapp/transaction-on-result]}
|
||||
@@ -338,7 +360,8 @@
|
||||
(fx/defn sync-app-db-with-wc-sessions
|
||||
{:events [:sync-wallet-connect-app-sessions]}
|
||||
[{:keys [db]} session-data]
|
||||
(let [chain-id (get-in db [:networks/networks (:networks/current-network db) :config :NetworkId])
|
||||
(let [_ (log/debug "sync-app-db-with-wc-sessions")
|
||||
chain-id (get-in db [:networks/networks (:networks/current-network db) :config :NetworkId])
|
||||
sessions (->> session-data
|
||||
(map :info)
|
||||
(map js/JSON.parse)
|
||||
@@ -347,7 +370,7 @@
|
||||
{:initialize-wc-sessions [chain-id sessions]})))
|
||||
|
||||
(fx/defn get-connector-session-from-db
|
||||
{:events [:get-connector-session-from-db]}
|
||||
{:events [:wallet-connect-legacy/get-connector-session-from-db]}
|
||||
[_]
|
||||
{::json-rpc/call [{:method "wakuext_getWalletConnectSession"
|
||||
:on-success #(re-frame/dispatch [:sync-wallet-connect-app-sessions %])
|
||||
|
||||
@@ -89,6 +89,7 @@ class TestrailReport(BaseTestReport):
|
||||
'include_all': False}
|
||||
run = self.post('add_run/%s' % self.project_id, request_body)
|
||||
self.run_id = run['id']
|
||||
print("Testrun: %sruns/view/%s" % (self.url, self.run_id))
|
||||
|
||||
def get_cases(self, section_ids):
|
||||
test_cases = list()
|
||||
@@ -157,9 +158,7 @@ class TestrailReport(BaseTestReport):
|
||||
else:
|
||||
for phase in test_cases:
|
||||
if phase != 'upgrade':
|
||||
print("For %s phase" % phase)
|
||||
for category in test_cases[phase]:
|
||||
print("For %s category" % category)
|
||||
for case in self.get_cases([test_cases[phase][category]]):
|
||||
case_ids.append(case['id'])
|
||||
return case_ids
|
||||
|
||||
@@ -102,7 +102,7 @@ class TestCommandsMultipleDevicesMerged(MultipleSharedDeviceTestCase):
|
||||
[message.transaction_status.wait_for_element_text(message.confirmed, 60) for message in
|
||||
(sender_message, receiver_message)]
|
||||
|
||||
# TODO: should be added PNs for receiver after getting more stable feature (rechecked 23.11.21, valid)
|
||||
# TODO: should be added PNs for receiver after getting more stable feature (rechecked 04.10.22, valid)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6265)
|
||||
@@ -337,19 +337,19 @@ class TestOneToOneChatMultipleSharedDevices(MultipleSharedDeviceTestCase):
|
||||
self.chat_2.send_message(message_before_edit_1_1)
|
||||
|
||||
self.chat_2.edit_message_in_chat(message_before_edit_1_1, message_after_edit_1_1)
|
||||
if not self.home_1.element_by_text_part(message_after_edit_1_1).is_element_present():
|
||||
if not self.home_1.element_by_text_part(message_after_edit_1_1).is_element_displayed():
|
||||
self.errors.append('UNedited message version displayed on preview')
|
||||
self.home_1.get_chat(self.default_username_2).click()
|
||||
chat_element = self.chat_1.chat_element_by_text(message_after_edit_1_1)
|
||||
if not chat_element.is_element_present(30):
|
||||
if not chat_element.is_element_displayed(30):
|
||||
self.errors.append('No edited message in 1-1 chat displayed')
|
||||
if not self.chat_1.element_by_text_part("⌫ Edited").is_element_present(30):
|
||||
if not self.chat_1.element_by_text_part("⌫ Edited").is_element_displayed(30):
|
||||
self.errors.append('No mark in message bubble about this message was edited on receiver side')
|
||||
|
||||
self.device_2.just_fyi("Verify Device1 can not edit and delete received message from Device2")
|
||||
chat_element.long_press_element()
|
||||
for action in ("edit", "delete"):
|
||||
if self.chat_1.element_by_translation_id(action).is_element_present():
|
||||
if self.chat_1.element_by_translation_id(action).is_element_displayed():
|
||||
self.errors.append('Option to %s someone else message available!' % action)
|
||||
self.home_1.click_system_back_button()
|
||||
|
||||
@@ -532,9 +532,9 @@ class TestOneToOneChatMultipleSharedDevices(MultipleSharedDeviceTestCase):
|
||||
self.chat_2.image_message_in_chat.click_until_presence_of_element(self.chat_2.share_image_icon_button)
|
||||
self.chat_2.share_image_icon_button.click()
|
||||
self.chat_2.share_via_messenger()
|
||||
if not self.chat_2.image_in_android_messenger.is_element_present():
|
||||
if not self.chat_2.image_in_android_messenger.is_element_displayed():
|
||||
self.errors.append("Can't share image")
|
||||
self.chat_2.click_system_back_button_until_element_is_shown()
|
||||
self.chat_2.click_system_back_button_until_element_is_shown(element=self.chat_2.save_image_icon_button)
|
||||
self.chat_2.save_image_icon_button.click()
|
||||
self.chat_2.show_images_button.click()
|
||||
self.chat_2.allow_button.wait_and_click()
|
||||
@@ -1153,7 +1153,7 @@ class TestEnsStickersMultipleDevicesMerged(MultipleSharedDeviceTestCase):
|
||||
self.errors.append('Sticker was not sent from Recent')
|
||||
|
||||
# self.home_2.just_fyi('Check that can install stickers by tapping on sticker message')
|
||||
# TODO: disabled because of #13683 (rechecked 27.07.22, valid)
|
||||
# TODO: disabled because of #13683 (rechecked 04.10.22, valid)
|
||||
self.home_2.home_button.double_click()
|
||||
self.home_2.get_chat(self.sender['username']).click()
|
||||
# self.chat_2.chat_item.click()
|
||||
|
||||
@@ -50,7 +50,7 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.home.just_fyi("Sharing contact code via messenger")
|
||||
self.profile.share_button.click()
|
||||
self.profile.share_via_messenger()
|
||||
if not self.profile.element_by_text_part(public_key).is_element_present():
|
||||
if not self.profile.element_by_text_part(public_key).is_element_displayed():
|
||||
self.errors.append("Can't share public key")
|
||||
self.profile.click_system_back_button_until_element_is_shown()
|
||||
|
||||
@@ -78,7 +78,7 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.home.just_fyi("Sharing wallet address via messenger")
|
||||
request.share_button.click()
|
||||
wallet.share_via_messenger()
|
||||
if not wallet.element_by_text_part(address).is_element_present():
|
||||
if not wallet.element_by_text_part(address).is_element_displayed():
|
||||
self.errors.append("Can't share address")
|
||||
wallet.click_system_back_button_until_element_is_shown()
|
||||
|
||||
@@ -477,4 +477,4 @@ class TestRestoreOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
transaction_amount_added = wallet.get_unique_amount()
|
||||
wallet.send_transaction(amount=transaction_amount_added, recipient=transaction_senders['ETH_8']['address'],
|
||||
keycard=True, sign_transaction=True)
|
||||
self.errors.verify_no_errors()
|
||||
self.errors.verify_no_errors()
|
||||
@@ -292,7 +292,7 @@ class TestPublicChatBrowserOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
def test_public_chat_copy_and_paste_message_in_chat_input(self):
|
||||
message_text = {'text_message': 'mmmeowesage_text'}
|
||||
formatted_message = {'message_with_link': 'https://status.im',
|
||||
# TODO: blocked with 11161 (rechecked 23.11.21, valid)
|
||||
# TODO: blocked with 11161 (rechecked 04.10.22, valid)
|
||||
# 'message_with_tag': '#successishere'
|
||||
}
|
||||
message_input = self.chat.chat_message_input
|
||||
|
||||
@@ -155,7 +155,7 @@ class TestSendTxDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.errors.append("Tx is not sent!")
|
||||
send_tx.ok_button.click()
|
||||
|
||||
# TODO: disabled due to 10838 (rechecked 27.07.22, valid)
|
||||
# TODO: disabled due to 10838 (rechecked 04.10.22, valid)
|
||||
# transactions_view = wallet.transaction_history_button.click()
|
||||
# transactions_view.transactions_table.find_transaction(amount=amount, asset=symbol)
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@@ -169,13 +169,13 @@ class TestActivityCenterMultipleDeviceMedium(MultipleSharedDeviceTestCase):
|
||||
self.home_1.home_button.double_click()
|
||||
|
||||
self.home_1.just_fyi("Check there are no unread messages counter on chats after message is read")
|
||||
if (self.home_1.notifications_unread_badge.is_element_present() or
|
||||
if (self.home_1.notifications_unread_badge.is_element_displayed() or
|
||||
self.home_1.get_chat_from_home_view(self.group_chat_name_1).new_messages_counter.text == "1"):
|
||||
self.errors.append("Unread message indicator is kept after message is read in chat")
|
||||
|
||||
self.home_1.just_fyi("Check there is an empty view on Activity Center")
|
||||
self.home_1.notifications_button.click()
|
||||
if not self.home_1.element_by_translation_id('empty-activity-center').is_element_present():
|
||||
if not self.home_1.element_by_translation_id('empty-activity-center').is_element_displayed():
|
||||
self.errors.append("Activity Center still has some chats after user has opened all of them")
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@@ -148,7 +148,7 @@ class TestTimelineHistoryNodesBootnodesMultipleDeviceMergedMedium(MultipleShared
|
||||
self.profile_1.bootnodes_button.click()
|
||||
self.profile_1.add_bootnode_button.click()
|
||||
self.profile_1.specify_name_input.set_value('test')
|
||||
# TODO: blocked as validation is missing for bootnodes (rechecked 27.07.22, valid)
|
||||
# TODO: blocked as validation is missing for bootnodes (rechecked 04.10.22, valid)
|
||||
# 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')
|
||||
@@ -420,7 +420,7 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
self.chat_1.send_message(self.message_1)
|
||||
self.chat_1.send_message(self.message_2)
|
||||
self.chat_1.pin_message(self.message_1)
|
||||
if not self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present():
|
||||
if not self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed():
|
||||
self.drivers[0].fail("Message is not pinned!")
|
||||
|
||||
self.home_1.just_fyi("Check that Device2 can pin Device1 message in 1-1 chat and two pinned "
|
||||
@@ -435,16 +435,16 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
self.chat_1.chat_options.click()
|
||||
self.chat_1.view_profile_button.click()
|
||||
self.chat_1.pinned_messages_button.click()
|
||||
if not (self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present() and
|
||||
self.chat_1.chat_element_by_text(self.message_2).pinned_by_label.is_element_present() and
|
||||
self.chat_1.chat_element_by_text(self.message_1).is_element_present() and
|
||||
self.chat_1.chat_element_by_text(self.message_2).is_element_present()):
|
||||
if not (self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed() and
|
||||
self.chat_1.chat_element_by_text(self.message_2).pinned_by_label.is_element_displayed() and
|
||||
self.chat_1.chat_element_by_text(self.message_1).is_element_displayed() and
|
||||
self.chat_1.chat_element_by_text(self.message_2).is_element_displayed()):
|
||||
self.drivers[0].fail("Something missed on Pinned messaged on Device 1!")
|
||||
self.chat_2.pinned_messages_button.click()
|
||||
if not (self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present() and
|
||||
self.chat_2.chat_element_by_text(self.message_2).pinned_by_label.is_element_present() and
|
||||
self.chat_2.chat_element_by_text(self.message_1).is_element_present() and
|
||||
self.chat_2.chat_element_by_text(self.message_2).is_element_present()):
|
||||
if not (self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed() and
|
||||
self.chat_2.chat_element_by_text(self.message_2).pinned_by_label.is_element_displayed() and
|
||||
self.chat_2.chat_element_by_text(self.message_1).is_element_displayed() and
|
||||
self.chat_2.chat_element_by_text(self.message_2).is_element_displayed()):
|
||||
self.drivers[0].fail("Something missed on Pinned messaged on Device 2!")
|
||||
self.chat_1.close_button.click()
|
||||
|
||||
@@ -454,25 +454,25 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
self.chat_1.send_message(self.message_4)
|
||||
self.chat_1.pin_message(self.message_3)
|
||||
self.chat_1.pin_message(self.message_4)
|
||||
if not self.chat_1.unpin_message_popup.is_element_present():
|
||||
if not self.chat_1.unpin_message_popup.is_element_displayed():
|
||||
self.drivers[0].fail("No 'Unpin' dialog appears when pining 4th message")
|
||||
|
||||
self.home_1.just_fyi("Unpin one message so that another could be pinned")
|
||||
self.chat_1.unpin_message_popup.message_text(self.message_1).click()
|
||||
self.chat_1.unpin_message_popup.click_unpin_message_button()
|
||||
|
||||
if self.chat_1.unpin_message_popup.is_element_present():
|
||||
if self.chat_1.unpin_message_popup.is_element_displayed():
|
||||
self.drivers[0].fail("Unpin message pop up keep staying after Unpin button pressed")
|
||||
if self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present():
|
||||
if self.chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed():
|
||||
self.drivers[0].fail("Message is not unpinned!")
|
||||
if not self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_present():
|
||||
if not self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed():
|
||||
self.drivers[0].fail("Message is not pinned!")
|
||||
|
||||
self.home_1.just_fyi("Unpin another message and check it's unpinned for another user")
|
||||
self.chat_2.close_button.click()
|
||||
self.chat_2.pin_message(self.message_4, action="unpin")
|
||||
self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.wait_for_invisibility_of_element()
|
||||
if self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_present():
|
||||
if self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed():
|
||||
self.drivers[0].fail("Message_4 is not unpinned!")
|
||||
|
||||
@marks.testrail_id(702065)
|
||||
@@ -577,13 +577,13 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
[home.get_chat(self.new_group_chat_name).click() for home in (self.home_1, self.home_2)]
|
||||
self.group_chat_1.send_message(self.message_1)
|
||||
self.group_chat_1.pin_message(self.message_1)
|
||||
if not (self.group_chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present(30) and
|
||||
self.group_chat_2.chat_element_by_text(self.message_1).pinned_by_label.is_element_present(30)):
|
||||
if not (self.group_chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed(30) and
|
||||
self.group_chat_2.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed(30)):
|
||||
self.errors.append("Message is not pinned in group chat!")
|
||||
|
||||
self.home_1.just_fyi("Check that non admin user can not unpin messages")
|
||||
self.group_chat_2.chat_element_by_text(self.message_1).long_press_element()
|
||||
if self.group_chat_2.element_by_translation_id("unpin").is_element_present():
|
||||
if self.group_chat_2.element_by_translation_id("unpin").is_element_displayed():
|
||||
self.errors.append("Unpin option is available for non-admin user")
|
||||
|
||||
self.home_1.just_fyi("Grant another user with admin rights and check he can unpin message now")
|
||||
@@ -593,8 +593,8 @@ class TestChatMediumMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
options.make_admin_button.click()
|
||||
self.group_chat_2.click_system_back_button()
|
||||
self.group_chat_2.pin_message(self.message_1, action="unpin")
|
||||
if (self.group_chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_present() and
|
||||
self.group_chat_2.chat_element_by_text(self.message_1).pinned_by_label.is_element_present()):
|
||||
if (self.group_chat_1.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed() and
|
||||
self.group_chat_2.chat_element_by_text(self.message_1).pinned_by_label.is_element_displayed()):
|
||||
self.errors.append("Message failed be unpinned by user who granted admin permissions!")
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@@ -43,7 +43,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.sign_in.open_weblink_and_login(deep_link)
|
||||
self.home = self.sign_in.get_home_view()
|
||||
self.home.plus_button.click_until_presence_of_element(self.home.start_new_chat_button)
|
||||
if not self.home.start_new_chat_button.is_element_present():
|
||||
if not self.home.start_new_chat_button.is_element_displayed():
|
||||
self.errors.append(
|
||||
"Can't navigate to start new chat after app opened from deep link with invalid public key")
|
||||
self.drivers[0].close_app()
|
||||
@@ -78,7 +78,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
|
||||
web_view = self.sign_in.get_chat_view()
|
||||
try:
|
||||
test_dapp_view = web_view.open_in_status_button.click()
|
||||
test_dapp_view.allow_button.is_element_present()
|
||||
test_dapp_view.allow_button.is_element_displayed()
|
||||
except NoSuchElementException:
|
||||
self.drivers[0].fail("DApp '%s' is not opened!" % dapp_name)
|
||||
self.home.reopen_app()
|
||||
@@ -96,7 +96,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
|
||||
chat.share_button.click()
|
||||
chat.share_via_messenger()
|
||||
if not chat.element_by_text_part(
|
||||
'https://join.status.im/u/%s' % dummy_user["public_key"]).is_element_present():
|
||||
'https://join.status.im/u/%s' % dummy_user["public_key"]).is_element_displayed():
|
||||
self.errors.append("Can't share public key of contact")
|
||||
for _ in range(2):
|
||||
chat.click_system_back_button_until_element_is_shown()
|
||||
@@ -112,7 +112,7 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.public_chat.share_chat_button.click()
|
||||
self.public_chat.share_via_messenger()
|
||||
if not self.public_chat.element_by_text_part(
|
||||
'https://join.status.im/%s' % self.public_chat_name).is_element_present():
|
||||
'https://join.status.im/%s' % self.public_chat_name).is_element_displayed():
|
||||
self.errors.append("Can't share link to public chat")
|
||||
for _ in range(2):
|
||||
self.public_chat.click_system_back_button_until_element_is_shown()
|
||||
@@ -130,8 +130,8 @@ class TestDeeplinkChatProfileOneDevice(MultipleSharedDeviceTestCase):
|
||||
expeceted_text_1 = 'https://join.status.im/b/https://dap.ps'
|
||||
expeceted_text_2 = 'https://join.status.im/b/http://dap.ps'
|
||||
|
||||
if not (browser.element_by_text_part(expeceted_text_1).is_element_present() or
|
||||
browser.element_by_text_part(expeceted_text_2).is_element_present()):
|
||||
if not (browser.element_by_text_part(expeceted_text_1).is_element_displayed() or
|
||||
browser.element_by_text_part(expeceted_text_2).is_element_displayed()):
|
||||
self.errors.append("Can't share link to URL")
|
||||
|
||||
browser.click_system_back_button_until_element_is_shown()
|
||||
|
||||
@@ -108,8 +108,6 @@ class TestPairingSyncMediumMultipleDevicesMerged(MultipleSharedDeviceTestCase):
|
||||
self.profile_1.sync_all_button.wait_for_visibility_of_element(20)
|
||||
[device.profile_button.double_click() for device in (self.profile_1, self.profile_2)]
|
||||
[device.home_button.double_click() for device in (self.profile_1, self.device_3)]
|
||||
# TODO Relogin to workaround #13647, should be removed after fix of the issue(rechecked 27.07.22, valid)
|
||||
self.profile_2.relogin()
|
||||
self.device_3.put_app_to_background_and_back()
|
||||
|
||||
@marks.testrail_id(702133)
|
||||
|
||||
@@ -470,13 +470,13 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
sign_in = SignInView(self.driver)
|
||||
sign_in.create_user()
|
||||
wallet = sign_in.wallet_button.click()
|
||||
if wallet.backup_recovery_phrase_warning_text.is_element_present():
|
||||
if wallet.backup_recovery_phrase_warning_text.is_element_displayed():
|
||||
self.driver.fail("'Back up your seed phrase' warning is shown on Wallet while no funds are present")
|
||||
address = wallet.get_wallet_address()
|
||||
self.click = wallet.close_button.click()
|
||||
w3.donate_testnet_eth(address, 0.0001)
|
||||
wallet.wait_balance_is_changed()
|
||||
if not wallet.backup_recovery_phrase_warning_text.is_element_present(30):
|
||||
if not wallet.backup_recovery_phrase_warning_text.is_element_displayed(30):
|
||||
self.driver.fail("'Back up your seed phrase' warning is not shown on Wallet with funds")
|
||||
profile = wallet.get_profile_view()
|
||||
wallet.backup_recovery_phrase_warning_text.click()
|
||||
@@ -813,7 +813,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
no_link_tos_error_msg = 'Could not open Terms of Use from'
|
||||
|
||||
signin.just_fyi("Checking privacy policy and TOS links")
|
||||
if not signin.privacy_policy_link.is_element_present():
|
||||
if not signin.privacy_policy_link.is_element_displayed():
|
||||
self.errors.append('%s Sign in view!' % no_link_found_error_msg)
|
||||
if not signin.terms_of_use_link.is_element_displayed():
|
||||
self.driver.fail("No Terms of Use link on Sign in view!")
|
||||
@@ -990,6 +990,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
self.driver.fail("Unblocked user not added previously in contact list added in contacts!")
|
||||
|
||||
@marks.testrail_id(5721)
|
||||
@marks.xfail(reason="may be failed due to #14013")
|
||||
def test_group_chat_cant_add_more_twenty_participants(self):
|
||||
user_20_contacts = dict()
|
||||
user_20_contacts[
|
||||
@@ -1123,7 +1124,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6300)
|
||||
@marks.skip
|
||||
# TODO: waiting mode (rechecked 27.07.22, valid)
|
||||
# TODO: waiting mode (rechecked 04.10.22, valid)
|
||||
def test_webview_security(self):
|
||||
home_view = SignInView(self.driver).create_user()
|
||||
daap_view = home_view.dapp_tab_button.click()
|
||||
|
||||
@@ -95,10 +95,9 @@ class BaseElement(object):
|
||||
counter = 0
|
||||
self.driver.info("Click until `%s` by `%s`: `%s` will be presented" % (
|
||||
desired_element.name, desired_element.by, desired_element.locator))
|
||||
while not desired_element.is_element_present(1) and counter <= attempts:
|
||||
while not desired_element.is_element_displayed(1) and counter <= attempts:
|
||||
try:
|
||||
self.find_element().click()
|
||||
desired_element.is_element_present(5)
|
||||
return self.navigate()
|
||||
except (NoSuchElementException, TimeoutException):
|
||||
counter += 1
|
||||
@@ -178,11 +177,11 @@ class BaseElement(object):
|
||||
self.scroll_to_element(direction=direction)
|
||||
self.click()
|
||||
|
||||
def is_element_present(self, sec=5):
|
||||
try:
|
||||
return self.wait_for_element(sec)
|
||||
except TimeoutException:
|
||||
return False
|
||||
# def is_element_present(self, sec=5):
|
||||
# try:
|
||||
# return self.wait_for_element(sec)
|
||||
# except TimeoutException:
|
||||
# return False
|
||||
|
||||
def is_element_displayed(self, sec=5, ignored_exceptions=None):
|
||||
try:
|
||||
@@ -374,7 +373,7 @@ class Button(BaseElement):
|
||||
counter = 0
|
||||
self.driver.info("Click until `%s` by `%s`: `%s` is NOT presented" % (
|
||||
desired_element.name, desired_element.by, desired_element.locator))
|
||||
while desired_element.is_element_present(1) and counter <= attempts:
|
||||
while desired_element.is_element_displayed(1) and counter <= attempts:
|
||||
try:
|
||||
self.find_element().click()
|
||||
counter += 1
|
||||
|
||||
@@ -196,7 +196,7 @@ class AirplaneModeButton(Button):
|
||||
def click(self):
|
||||
counter = 0
|
||||
desired_element = AirplaneModeButton(self.driver)
|
||||
while not desired_element.is_element_present() and counter <= 3:
|
||||
while not desired_element.is_element_displayed() and counter <= 3:
|
||||
try:
|
||||
self.open_quick_action_menu()
|
||||
desired_element.wait_for_element(5)
|
||||
@@ -313,7 +313,7 @@ class BaseView(object):
|
||||
|
||||
def close_native_device_dialog(self, alert_text_part):
|
||||
element = self.element_by_text_part(alert_text_part)
|
||||
if element.is_element_present(1):
|
||||
if element.is_element_displayed(1):
|
||||
self.driver.info("Closing '%s' alert..." % alert_text_part)
|
||||
self.native_close_button.click()
|
||||
|
||||
@@ -330,7 +330,7 @@ class BaseView(object):
|
||||
|
||||
def confirm_until_presence_of_element(self, desired_element, attempts=3):
|
||||
counter = 0
|
||||
while not desired_element.is_element_present(1) and counter <= attempts:
|
||||
while not desired_element.is_element_displayed(1) and counter <= attempts:
|
||||
try:
|
||||
self.confirm()
|
||||
self.driver.info("Wait for '%s'" % desired_element.name)
|
||||
@@ -352,17 +352,16 @@ class BaseView(object):
|
||||
counter = 0
|
||||
if element == 'home':
|
||||
element = self.home_button
|
||||
while not element.is_element_present(1) and counter <= attempts:
|
||||
while not element.is_element_displayed(1) and counter <= attempts:
|
||||
self.driver.press_keycode(4)
|
||||
try:
|
||||
element.is_element_present(5)
|
||||
element.wait_for_element(2)
|
||||
return self
|
||||
except (NoSuchElementException, TimeoutException):
|
||||
counter += 1
|
||||
else:
|
||||
self.driver.info("Could not reach %s element by pressing back" % element.name)
|
||||
|
||||
|
||||
def get_app_from_background(self):
|
||||
self.driver.info('Get Status back from Recent apps')
|
||||
self.driver.press_keycode(187)
|
||||
|
||||
@@ -976,7 +976,7 @@ class ChatView(BaseView):
|
||||
|
||||
if image:
|
||||
self.timeline_open_images_panel_button.click()
|
||||
if self.allow_button.is_element_present():
|
||||
if self.allow_button.is_element_displayed():
|
||||
self.allow_button.click()
|
||||
self.first_image_from_gallery.click()
|
||||
self.timeline_send_my_status_button.click()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -470,7 +470,7 @@ class ProfileView(BaseView):
|
||||
def retry_to_connect_to_mailserver(self):
|
||||
self.driver.info("Retrying to connect to mailserver 5 times")
|
||||
i = 0
|
||||
while self.element_by_translation_id("mailserver-error-title").is_element_present(20) and i < 5:
|
||||
while self.element_by_translation_id("mailserver-error-title").is_element_displayed(20) and i < 5:
|
||||
self.element_by_translation_id("mailserver-retry", uppercase=True).click()
|
||||
i += 1
|
||||
self.just_fyi("retrying to connect: %s attempt" % i)
|
||||
|
||||
@@ -105,7 +105,7 @@ class TermsOfUseLink(Button):
|
||||
|
||||
def click(self):
|
||||
counter = 0
|
||||
while PrivacyPolicyLink(self.driver).is_element_present(1) and counter <= 5:
|
||||
while PrivacyPolicyLink(self.driver).is_element_displayed(1) and counter <= 5:
|
||||
try:
|
||||
self.click_inside_element_by_coordinate(times_to_click=2)
|
||||
counter += 1
|
||||
|
||||
@@ -182,7 +182,7 @@ class WalletView(BaseView):
|
||||
if counter >= wait_time:
|
||||
self.driver.fail(
|
||||
'Balance %s %s is not changed during %s seconds!' % (asset, initial_balance, wait_time))
|
||||
elif self.asset_by_name(asset).is_element_present() and self.get_asset_amount_by_name(
|
||||
elif self.asset_by_name(asset).is_element_displayed() and self.get_asset_amount_by_name(
|
||||
asset) == initial_balance:
|
||||
if scan_tokens:
|
||||
self.scan_tokens()
|
||||
@@ -192,7 +192,7 @@ class WalletView(BaseView):
|
||||
counter += 10
|
||||
time.sleep(10)
|
||||
self.driver.info('Waiting %ss for %s updated balance' % (counter, asset))
|
||||
elif not self.asset_by_name(asset).is_element_present(10):
|
||||
elif not self.asset_by_name(asset).is_element_displayed(10):
|
||||
if scan_tokens:
|
||||
self.scan_tokens()
|
||||
self.swipe_up()
|
||||
|
||||
@@ -45,7 +45,7 @@ class BaseWebView(BaseView):
|
||||
def wait_for_d_aap_to_load(self, wait_time=35):
|
||||
self.driver.info("Waiting %ss for dapp to load" % wait_time)
|
||||
counter = 0
|
||||
while self.progress_bar_icon.is_element_present(5):
|
||||
while self.progress_bar_icon.is_element_displayed(5):
|
||||
time.sleep(1)
|
||||
counter += 1
|
||||
if counter > wait_time:
|
||||
|
||||
Reference in New Issue
Block a user