Compare commits
37
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bed2057d97 | ||
|
|
ce87945736 | ||
|
|
f4e0c69d72 | ||
|
|
09c4e33834 | ||
|
|
5b79f40de1 | ||
|
|
6b29021075 | ||
|
|
236dc37159 | ||
|
|
b43fc6fabf | ||
|
|
3d205c837c | ||
|
|
5c8fc2f700 | ||
|
|
1c9d69416b | ||
|
|
26fb0b20e7 | ||
|
|
b47f53777d | ||
|
|
1d298d0a5d | ||
|
|
b6f59bc5c0 | ||
|
|
38dd9c46c2 | ||
|
|
2b6e782e80 | ||
|
|
c32f31f8cd | ||
|
|
50e41c8ed5 | ||
|
|
93b748a629 | ||
|
|
a324481206 | ||
|
|
254717971e | ||
|
|
05279c111e | ||
|
|
b4a49bfe55 | ||
|
|
e5c3357317 | ||
|
|
da2e5ff1c0 | ||
|
|
f69f075e29 | ||
|
|
81350b978f | ||
|
|
f59dca0589 | ||
|
|
745e5d75fb | ||
|
|
7c6f2bf878 | ||
|
|
29203e57ec | ||
|
|
0f15c0192d | ||
|
|
a1784c5e1f | ||
|
|
45cf31d469 | ||
|
|
f958d95467 | ||
|
|
894f8f26ee |
@@ -19,4 +19,5 @@ MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
STATUS_PROXY_STAGE_NAME=prod
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -436,11 +436,10 @@ android-clean: ##@prepare Clean Gradle state
|
||||
rm -rf ~/.gradle
|
||||
|
||||
|
||||
android-ports: export FLOWSTORM_PORT ?= 7722
|
||||
android-ports: export FLOWSTORM_PORT := 7722
|
||||
android-ports: export TARGET := android-sdk
|
||||
android-ports: export RCT_METRO_PORT ?= 8081
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:$(RCT_METRO_PORT) tcp:$(RCT_METRO_PORT) && \
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
hermesEnabled ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_hermesEnabled" "true",
|
||||
buildUrl ? lib.getEnvWithDefault "ORG_GRADLE_PROJECT_buildUrl" null,
|
||||
statusGoSrcOverride ? lib.getEnvWithDefault "STATUS_GO_SRC_OVERRIDE" null,
|
||||
reactMetroPort ? lib.getEnvWithDefault "RCT_METRO_PORT" 8081,
|
||||
# If APKs should be split based on architectures
|
||||
androidAbiSplit ? lib.getEnvWithDefault "ANDROID_ABI_SPLIT" "true",
|
||||
# Android architectures to build for
|
||||
@@ -159,7 +158,6 @@ in stdenv.mkDerivation rec {
|
||||
--no-build-cache \
|
||||
--parallel \
|
||||
-Dmaven.repo.local='${deps.gradle}' \
|
||||
-PreactNativeDevServerPort=${toString reactMetroPort} \
|
||||
assemble${gradleBuildType}
|
||||
'';
|
||||
in
|
||||
|
||||
@@ -6,7 +6,7 @@ if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
echo "Error: make run-metro is already running in another terminal" >&2
|
||||
echo "Please close that terminal before running this command." >&2
|
||||
exit 1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
echo "Info: metro is already running in another terminal"
|
||||
else
|
||||
echo "Info: starting a new metro terminal"
|
||||
react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
|
||||
react-native start --reset-cache
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
TIMEOUT=10 # Metro should not take this long to start.
|
||||
|
||||
while [ "${TIMEOUT}" -gt 0 ]; do
|
||||
if ! lsof -i:"${RCT_METRO_PORT:-8081}" &> /dev/null; then
|
||||
if ! lsof -i:8081 &> /dev/null; then
|
||||
echo "."
|
||||
sleep 1
|
||||
((TIMEOUT--))
|
||||
|
||||
@@ -3,14 +3,30 @@
|
||||
[quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.home.title-column.style :as style]
|
||||
[status-im.common.plus-button.view :as plus-button]))
|
||||
[status-im.common.plus-button.view :as plus-button]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(defn view
|
||||
[{:keys [label handler accessibility-label customization-color]}]
|
||||
[{:keys [beta? label handler accessibility-label customization-color]}]
|
||||
[rn/view style/title-column
|
||||
[rn/view {:flex 1}
|
||||
[rn/view
|
||||
{:style {:flex 1
|
||||
:align-items :center
|
||||
:flex-direction :row}}
|
||||
[quo/text style/title-column-text
|
||||
label]]
|
||||
label]
|
||||
(when beta?
|
||||
[rn/view
|
||||
{:style {:padding-top 6
|
||||
:padding-bottom 2}}
|
||||
[quo/tag
|
||||
{:accessibility-label :communities-chat-beta-tag
|
||||
:size 32
|
||||
:type :label
|
||||
:label (i18n/label :t/beta)
|
||||
:labelled? true
|
||||
:blurred? false}]])]
|
||||
|
||||
(when handler
|
||||
[plus-button/plus-button
|
||||
{:on-press handler
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
(def opensea-api-key OPENSEA_API_KEY)
|
||||
(def status-proxy-enabled? true)
|
||||
(def status-proxy-stage-name (get-config :STATUS_PROXY_STAGE_NAME "test"))
|
||||
(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1")))
|
||||
(def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED)))
|
||||
(def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0")))
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
(defn- banner-data
|
||||
[profile-link]
|
||||
{:title-props
|
||||
{:label (i18n/label :t/messages)
|
||||
{:beta? true
|
||||
:label (i18n/label :t/messages)
|
||||
:handler #(rf/dispatch
|
||||
[:show-bottom-sheet {:content chat.actions.view/new-chat}])
|
||||
:accessibility-label :new-chat-button}
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
|
||||
(def ^:private banner-data
|
||||
{:title-props
|
||||
{:label (i18n/label :t/communities)
|
||||
{:beta? true
|
||||
:label (i18n/label :t/communities)
|
||||
:handler (when config/fast-create-community-enabled?
|
||||
#(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}]))
|
||||
:accessibility-label :new-communities-button}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
:justify-content :flex-end})
|
||||
|
||||
(def text-container
|
||||
{:flex 1
|
||||
:flex-wrap :wrap
|
||||
:text-align :center})
|
||||
{:flex 1
|
||||
:flex-direction :row
|
||||
:flex-wrap :wrap
|
||||
:align-self :center})
|
||||
|
||||
(def terms-privacy-container
|
||||
{:gap 8
|
||||
@@ -20,8 +21,7 @@
|
||||
{:color colors/white-opa-70})
|
||||
|
||||
(def highlighted-text
|
||||
{:flex 1
|
||||
:color colors/white})
|
||||
{:color colors/white})
|
||||
|
||||
(defn bottom-actions-container
|
||||
[bottom-insets]
|
||||
|
||||
@@ -27,12 +27,11 @@
|
||||
{:accessibility-label :terms-privacy-checkbox-container}
|
||||
[quo/selectors
|
||||
{:type :checkbox
|
||||
:blur? true
|
||||
:checked? terms-accepted?
|
||||
:on-change #(set-terms-accepted? not)}]]
|
||||
[rn/view {:style {:flex 1}}
|
||||
[quo/text
|
||||
{:style style/text-container
|
||||
:size :paragraph-2}
|
||||
[rn/view {:style style/text-container}
|
||||
[quo/text
|
||||
{:style style/plain-text
|
||||
:size :paragraph-2}
|
||||
@@ -42,7 +41,8 @@
|
||||
{:content (fn [] [terms/terms-of-use])
|
||||
:shell? true}])
|
||||
:style style/highlighted-text
|
||||
:size :paragraph-2}
|
||||
:size :paragraph-2
|
||||
:weight :medium}
|
||||
(i18n/label :t/terms-of-service)]
|
||||
[quo/text
|
||||
{:style style/plain-text
|
||||
@@ -54,7 +54,7 @@
|
||||
:shell? true}])
|
||||
:style style/highlighted-text
|
||||
:size :paragraph-2
|
||||
:weight :regular}
|
||||
:weight :medium}
|
||||
(i18n/label :t/intro-privacy-statement)]]]]
|
||||
:button-one-label (i18n/label :t/sync-or-recover-profile)
|
||||
:button-one-props {:type :dark-grey
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
{;; Temporary fix until https://github.com/status-im/status-go/issues/3024 is resolved
|
||||
:wakuV2Nameserver "8.8.8.8"
|
||||
:statusProxyEnabled config/status-proxy-enabled?
|
||||
:statusProxyMarketUser config/STATUS_BUILD_PROXY_USER
|
||||
:statusProxyMarketPassword config/STATUS_BUILD_PROXY_PASSWORD
|
||||
:statusProxyBlockchainUser config/STATUS_BUILD_PROXY_USER
|
||||
:statusProxyBlockchainPassword config/STATUS_BUILD_PROXY_PASSWORD
|
||||
:statusProxyStageName config/status-proxy-stage-name
|
||||
:statusProxyMarketUser "test"
|
||||
:statusProxyMarketPassword "test"
|
||||
:statusProxyBlockchainUser "test"
|
||||
:statusProxyBlockchainPassword "test"
|
||||
:openseaAPIKey config/opensea-api-key
|
||||
:poktToken config/POKT_TOKEN
|
||||
:infuraToken config/INFURA_TOKEN
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
:WakuV2Config {;; Temporary fix until https://github.com/status-im/status-go/issues/3024
|
||||
;; is resolved
|
||||
:Nameserver "8.8.8.8"
|
||||
:LightClient false}
|
||||
:LightClient true}
|
||||
:ShhextConfig {:VerifyTransactionURL config/verify-transaction-url
|
||||
:VerifyENSURL config/verify-ens-url
|
||||
:VerifyENSContractAddress config/verify-ens-contract-address
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
[utils.number :as number]
|
||||
[utils.string]))
|
||||
|
||||
(def missing-price-decimals 6) ; if we don't have the monetary value of the token, we default to 6 decimals
|
||||
(defn get-first-name
|
||||
[full-name]
|
||||
(first (string/split full-name #" ")))
|
||||
@@ -66,16 +67,20 @@
|
||||
(defn get-standard-crypto-format
|
||||
"For full details: https://github.com/status-im/status-mobile/issues/18225"
|
||||
[{:keys [market-values-per-currency]} token-units]
|
||||
(if (or (nil? token-units)
|
||||
(nil? market-values-per-currency)
|
||||
(money/equal-to token-units 0))
|
||||
"0"
|
||||
(let [price (-> market-values-per-currency :usd :price)
|
||||
one-cent-value (if (pos? price) (/ 0.01 price) 0)
|
||||
decimals-count (calc-max-crypto-decimals one-cent-value)]
|
||||
(if (< token-units one-cent-value)
|
||||
(str "<" (number/remove-trailing-zeroes (.toFixed one-cent-value decimals-count)))
|
||||
(number/remove-trailing-zeroes (.toFixed token-units decimals-count))))))
|
||||
(cond (or (nil? token-units)
|
||||
(money/equal-to token-units 0))
|
||||
"0"
|
||||
|
||||
(nil? (-> market-values-per-currency :usd :price))
|
||||
(number/remove-trailing-zeroes (.toFixed token-units missing-price-decimals))
|
||||
|
||||
:else
|
||||
(let [price (-> market-values-per-currency :usd :price)
|
||||
one-cent-value (if (pos? price) (/ 0.01 price) 0)
|
||||
decimals-count (calc-max-crypto-decimals one-cent-value)]
|
||||
(if (< token-units one-cent-value)
|
||||
(str "<" (number/remove-trailing-zeroes (.toFixed one-cent-value decimals-count)))
|
||||
(number/remove-trailing-zeroes (.toFixed token-units decimals-count))))))
|
||||
|
||||
(defn get-market-value
|
||||
[currency {:keys [market-values-per-currency]}]
|
||||
|
||||
@@ -64,6 +64,11 @@
|
||||
(is (= (utils/get-standard-crypto-format {:market-values-per-currency market-values-per-currency}
|
||||
token-units)
|
||||
"0.005")))
|
||||
(let [market-values-per-currency {:usd {:price nil}}
|
||||
token-units (money/bignumber 0.0123456)]
|
||||
(is (= (utils/get-standard-crypto-format {:market-values-per-currency market-values-per-currency}
|
||||
token-units)
|
||||
"0.012346")))
|
||||
(let [market-values-per-currency {:usd {:price 0.005}}
|
||||
token-units (money/bignumber 0.01)]
|
||||
(is (= (utils/get-standard-crypto-format {:market-values-per-currency market-values-per-currency}
|
||||
|
||||
@@ -296,7 +296,6 @@
|
||||
{:start-flow? true
|
||||
:flow-id :wallet-bridge-flow}]]]}))
|
||||
|
||||
|
||||
(rf/reg-event-fx :wallet/select-bridge-network
|
||||
(fn [{:keys [db]} [{:keys [network-chain-id stack-id]}]]
|
||||
{:db (assoc-in db [:wallet :ui :send :bridge-to-chain-id] network-chain-id)
|
||||
@@ -497,16 +496,15 @@
|
||||
(string/join ", ")))]
|
||||
(when (seq down-chain-ids)
|
||||
(log/info "[wallet] Chain(s) down: " down-chain-ids)
|
||||
(log/info "[wallet] Chain name(s) down: " chain-names)
|
||||
(log/info "[wallet] Test network enabled: " (boolean test-networks-enabled?))
|
||||
(log/info "[wallet] Goerli network enabled: " (boolean is-goerli-enabled?)))
|
||||
{:db (assoc-in db [:wallet :statuses :blockchains] chains)
|
||||
:fx [(when chains-down?
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
{:id :chains-down
|
||||
:type :negative
|
||||
:text (i18n/label :t/provider-is-down {:chains chain-names})
|
||||
:duration constants/toast-chain-down-duration}]])]})))
|
||||
|
||||
;; NOTE <shivekkhurana>: We used to show an error toast, but disabled it because the down
|
||||
;; signal is sent randomly. Needs to be investigated and enabled again !
|
||||
;; Context: https://github.com/status-im/status-mobile/issues/21054
|
||||
|
||||
{:db (assoc-in db [:wallet :statuses :blockchains] chains)})))
|
||||
|
||||
(rf/reg-event-fx :wallet/reset-selected-networks
|
||||
(fn [{:keys [db]}]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.182.42",
|
||||
"commit-sha1": "a93c857238c3002ae64da1bdbebea13f3392da8b",
|
||||
"src-sha256": "0rrny83rnirpm5pwp8br6nnglijb4whx1xl6nwkm5lzfnnichg59"
|
||||
"version": "test/set-api-proxy-test-debug",
|
||||
"commit-sha1": "022b6fd45b99819ec14baabd6d482ae85ed468bf",
|
||||
"src-sha256": "03p7x3s9005ghi02x334077nxwdhwlkxmvhcnc07lsygfsnzkkzk"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import logging
|
||||
import time
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from json import JSONDecodeError
|
||||
from os import environ
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
import pytz
|
||||
import requests
|
||||
from selenium.common import TimeoutException
|
||||
|
||||
@@ -40,7 +38,7 @@ class NetworkApi:
|
||||
return self.send_etherscan_request(params)
|
||||
|
||||
def get_transactions(self, address: str) -> List[dict]:
|
||||
params = {'module': 'account', 'action': 'txlist', 'address': address, 'page': 1, 'offset': 10, 'sort': 'desc'}
|
||||
params = {'module': 'account', 'action': 'txlist', 'address': address, 'sort': 'desc'}
|
||||
return self.send_etherscan_request(params)
|
||||
|
||||
def is_transaction_successful(self, transaction_hash: str) -> int:
|
||||
@@ -108,28 +106,22 @@ class NetworkApi:
|
||||
self.log("Failed iterate transactions(Etherscan unexpected error): " + str(e))
|
||||
continue
|
||||
|
||||
def wait_for_confirmation_of_transaction(self, address, tx_time, confirmations=7, token=False):
|
||||
expected_tx_timestamp = datetime.strptime(tx_time, "%Y-%m-%dT%H:%M:%S%z").replace(tzinfo=pytz.UTC)
|
||||
def wait_for_confirmation_of_transaction(self, address, amount, confirmations=6, token=False):
|
||||
start_time = time.time()
|
||||
if token:
|
||||
token_info = "token transaction"
|
||||
else:
|
||||
token_info = "ETH transaction"
|
||||
self.log('Waiting for %s of %s to have %s confirmations' % (token_info, address, confirmations))
|
||||
self.log('Waiting %s %s for %s to have %s confirmations' % (amount, token_info, address, confirmations))
|
||||
while round(time.time() - start_time, ndigits=2) < 600: # should be < idleTimeout capability
|
||||
if token:
|
||||
transaction = self.get_token_transactions(address)[0]
|
||||
else:
|
||||
transaction = self.get_transactions(address)[0]
|
||||
tx_timestamp = datetime.fromtimestamp(int(transaction['timeStamp'])).replace(tzinfo=pytz.UTC)
|
||||
if tx_timestamp > expected_tx_timestamp:
|
||||
if int(transaction['confirmations']) >= confirmations:
|
||||
return
|
||||
time.sleep(20)
|
||||
transaction = self.find_transaction_by_unique_amount(address, amount, token)
|
||||
self.log(
|
||||
'Expected amount of confirmations is %s, in fact %s' % (confirmations, transaction['confirmations']))
|
||||
pytest.fail('The last transaction was not confirmed, address is %s, still has %s confirmations' % (
|
||||
address, int(transaction['confirmations'])))
|
||||
if int(transaction['confirmations']) >= confirmations:
|
||||
return
|
||||
time.sleep(20)
|
||||
pytest.fail('Transaction with amount %s was not confirmed, address is %s, still has %s confirmations' % (
|
||||
amount, address, int(transaction['confirmations'])))
|
||||
|
||||
def verify_balance_is_updated(self, initial_balance, recipient_address, wait_time=360):
|
||||
counter = 0
|
||||
@@ -150,7 +142,7 @@ class NetworkApi:
|
||||
balance = round(self.get_balance(address), 4)
|
||||
if balance == expected_balance:
|
||||
return
|
||||
time.sleep(20)
|
||||
time.sleep(10)
|
||||
raise TimeoutException(
|
||||
'balance is not updated on Etherscan, it is %s but expected to be %s' % (balance, expected_balance))
|
||||
|
||||
|
||||
@@ -264,15 +264,15 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
expected_communities = {
|
||||
# ' 0xUX': ['Design', 'Ethereum', 'Collaboration'],
|
||||
'Status': ['Web3', 'Blockchain', 'Ethereum'],
|
||||
# 'Status Inu': ['News', 'Social', 'Web3'],
|
||||
'Status Inu': ['News', 'Social', 'Web3'],
|
||||
}
|
||||
for community_name, tags in expected_communities.items():
|
||||
self.home.just_fyi("Check %s community tags in the Discover communities screen" % community_name)
|
||||
card = self.home.get_discover_community_card_by_name(community_name=community_name)
|
||||
try:
|
||||
card.wait_for_visibility_of_element(30)
|
||||
# if community_name == 'Status':
|
||||
# card.swipe_to_web_element()
|
||||
if community_name == 'Status':
|
||||
card.swipe_to_web_element()
|
||||
missing_tags = list()
|
||||
for text in tags:
|
||||
try:
|
||||
@@ -281,17 +281,18 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
missing_tags.append(text)
|
||||
if missing_tags:
|
||||
self.errors.append("Community '%s' is missing tag(s) %s." % (community_name, ','.join(tags)))
|
||||
# if community_name == 'Status':
|
||||
self.home.just_fyi("Check Status community screen")
|
||||
card.click()
|
||||
if self.community_view.join_button.is_element_differs_from_template(
|
||||
'status_community_join_button.png'):
|
||||
self.errors.append("Status community Join button is different from expected template.")
|
||||
if self.community_view.community_logo.is_element_differs_from_template('status_community_logo.png'):
|
||||
self.errors.append("Status community logo is different from expected template.")
|
||||
|
||||
# self.community_view.close_community_view_button.click()
|
||||
# self.home.swipe_up()
|
||||
if community_name == 'Status':
|
||||
self.home.just_fyi("Check Status community screen")
|
||||
card.click()
|
||||
if self.community_view.join_button.is_element_differs_from_template(
|
||||
'status_community_join_button.png'):
|
||||
self.errors.append("Status community Join button is different from expected template.")
|
||||
if self.community_view.community_logo.is_element_differs_from_template('status_community_logo.png'):
|
||||
self.errors.append("Status community logo is different from expected template.")
|
||||
|
||||
self.community_view.close_community_view_button.click()
|
||||
self.home.swipe_up()
|
||||
|
||||
except TimeoutException:
|
||||
self.errors.append("Community '%s' is not in the Discover Communities list." % community_name)
|
||||
|
||||
@@ -17,14 +17,13 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.home = self.sign_in.create_user(username=self.username)
|
||||
self.home.communities_tab.click_until_presence_of_element(self.home.plus_community_button)
|
||||
self.open_community_name = "open community"
|
||||
self.community_name = "open community"
|
||||
self.channel_name = "general"
|
||||
self.community = self.home.create_community(community_type="open")
|
||||
self.profile_view = self.home.get_profile_view()
|
||||
self.browser_view = self.home.get_dapp_view()
|
||||
self.home.get_chat(self.open_community_name, community=True).click()
|
||||
self.home.get_chat(self.community_name, community=True).click()
|
||||
self.community_view = self.home.get_community_view()
|
||||
self.open_community_url = self.community_view.copy_community_link()
|
||||
self.channel = self.community_view.get_channel(self.channel_name).click()
|
||||
|
||||
@marks.testrail_id(704613)
|
||||
@@ -40,6 +39,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.channel.send_message(url)
|
||||
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
|
||||
if self.channel.profile_send_contact_request_button.is_element_displayed(10):
|
||||
# username_text = self.profile_view.default_username_text.text
|
||||
username_text = self.profile_view.contact_name_text.text
|
||||
if not (username_text.endswith(url[-6:]) or username_text == text):
|
||||
self.errors.append("Incorrect username is shown for profile url %s" % url)
|
||||
@@ -47,10 +47,34 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.errors.append("Profile was not opened by the profile url %s" % url)
|
||||
self.profile_view.close_button.click()
|
||||
|
||||
community_urls = {
|
||||
"https://status.app/c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
|
||||
"SNT community",
|
||||
"https://status.app/c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
|
||||
"open community",
|
||||
"https://status.app/c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
|
||||
"closed community"
|
||||
}
|
||||
for url, text in community_urls.items():
|
||||
self.channel.just_fyi("Opening community '%s' by the url %s" % (text, url))
|
||||
self.channel.chat_message_input.clear()
|
||||
self.channel.send_message(url)
|
||||
self.channel.chat_element_by_text(url).click_on_link_inside_message_body()
|
||||
if text == 'SNT community':
|
||||
if self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
|
||||
else:
|
||||
if not self.community_view.join_button.is_element_displayed(
|
||||
10) or self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
|
||||
if text != "closed community": # the last one
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.get_to_community_channel_from_home(self.community_name)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702775)
|
||||
def test_links_deep_links_profile(self):
|
||||
def test_links_deep_links(self):
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.browser_tab.click()
|
||||
|
||||
@@ -63,6 +87,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
for link, text in profile_links.items():
|
||||
self.channel.just_fyi("Opening profile link %s" % link)
|
||||
self.browser_view.open_url(link)
|
||||
# shown_name_text = self.profile_view.default_username_text.text
|
||||
shown_name_text = self.profile_view.contact_name_text.text
|
||||
if text:
|
||||
name_is_shown = shown_name_text == text or shown_name_text.endswith(link[-6:])
|
||||
@@ -72,43 +97,25 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
|
||||
self.errors.append("Profile was not opened by the profile deep link %s" % link)
|
||||
self.browser_view.click_system_back_button()
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(739307)
|
||||
def test_deep_links_communities(self):
|
||||
closed_community_name, snt_community_name = "closed community", "SNT community"
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.communities_tab.click()
|
||||
self.home.create_community(community_type="closed")
|
||||
if not self.community_view.community_options_button.is_element_displayed():
|
||||
self.home.get_chat(closed_community_name, community=True).click()
|
||||
closed_community_url = self.community_view.copy_community_link()
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.create_community(community_type="token-gated")
|
||||
if not self.community_view.community_options_button.is_element_displayed():
|
||||
self.home.get_chat(snt_community_name, community=True).click()
|
||||
snt_community_url = self.community_view.copy_community_link()
|
||||
self.home.reopen_app(sign_in=False)
|
||||
self.sign_in.create_user(username="second user", first_user=False)
|
||||
self.home.browser_tab.click()
|
||||
|
||||
old, new = "https://status.app/", "status-app://"
|
||||
community_links = {
|
||||
snt_community_name: snt_community_url.replace(old, new),
|
||||
self.open_community_name: self.open_community_url.replace(old, new),
|
||||
closed_community_name: closed_community_url.replace(old, new)
|
||||
"status.app://c/ixyACjgKDVNOVCBjb21tdW5pdHkSHHJlcXVpcmUgMTAgU05UIEdvZXJsaSB0byB1c2UYASIHI2VhYjcwMAM=#zQ3shUeGnhM33QW4g9JfYfeLFAH9ZwbDboNYn5exCR7S3ii1y":
|
||||
"SNT community",
|
||||
"status.app://c/G0UAAMTyNsn2QZDEG0EXftOl8pOEfwEBOOSA_YTfIk85xmADDgINGmxpUHAXzK36bN0fK42Xf4YD2yjPk1z2pbFwFw==#zQ3sheoNX5kiuM393TJ6xDnL57aQoiwFWEuJnazJ6W2eNuh9u":
|
||||
"open community",
|
||||
"status.app://c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shp9f5M3uyMpwTi3rFpFrP6WCWmNsW9pgK9cjXVTaf2vgj":
|
||||
"closed community"
|
||||
}
|
||||
for text, link in community_links.items():
|
||||
for link, text in community_links.items():
|
||||
self.channel.just_fyi("Opening community '%s' by the link %s" % (text, link))
|
||||
self.browser_view.open_url(link)
|
||||
if text == snt_community_name:
|
||||
if text == 'SNT community':
|
||||
if self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
|
||||
else:
|
||||
if not self.community_view.join_button.is_element_displayed(
|
||||
10) or self.community_view.community_title.text != text:
|
||||
self.errors.append("Community '%s' was not requested to join by the deep link %s" % (text, link))
|
||||
if text != closed_community_name: # the last one
|
||||
if text != "closed community": # the last one
|
||||
self.home.navigate_back_to_home_view()
|
||||
self.home.browser_tab.click()
|
||||
|
||||
|
||||
@@ -135,14 +135,11 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.wallet_1.just_fyi("Sending funds from wallet")
|
||||
amount_to_send = 0.0001
|
||||
device_time_before_sending = self.wallet_1.driver.device_time
|
||||
self.wallet_1.send_asset(address='arb1:' + self.receiver['wallet_address'],
|
||||
asset_name='Ether',
|
||||
amount=amount_to_send)
|
||||
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
|
||||
tx_time=device_time_before_sending)
|
||||
|
||||
device_time_after_sending = self.wallet_1.driver.device_time
|
||||
device_time = self.wallet_1.driver.device_time
|
||||
|
||||
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
|
||||
eth_amount_receiver)
|
||||
@@ -167,13 +164,10 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.wallet_1.just_fyi("Sending asset from drawer")
|
||||
amount_to_send = 0.0001
|
||||
device_time_before_sending = self.wallet_1.driver.device_time
|
||||
self.wallet_1.send_asset_from_drawer(address='arb1:' + self.receiver['wallet_address'],
|
||||
asset_name='Ether',
|
||||
amount=amount_to_send)
|
||||
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
|
||||
tx_time=device_time_before_sending)
|
||||
device_time_after_sending = self.wallet_1.driver.device_time
|
||||
device_time = self.wallet_1.driver.device_time
|
||||
|
||||
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
|
||||
eth_amount_receiver)
|
||||
|
||||
@@ -372,7 +372,7 @@ class CommunityView(HomeView):
|
||||
self.community_create_a_channel_button = Button(self.driver, accessibility_id="community-create-channel")
|
||||
self.channel_name_edit_box = EditBox(self.driver, translation_id="name-your-channel-placeholder")
|
||||
self.channel_descripton = ChatView(self.driver).community_description_edit_box
|
||||
self.community_options_button = Button(self.driver, accessibility_id="community-options-for-community")
|
||||
self.community_options_button = Button(self.driver, accessibility_id="community-menu-button")
|
||||
self.view_members_button = Button(self.driver, accessibility_id="view-members")
|
||||
self.community_info_button = Button(self.driver, translation_id="community-info")
|
||||
self.invite_button = Button(self.driver, accessibility_id="community-invite-people")
|
||||
@@ -455,10 +455,11 @@ class CommunityView(HomeView):
|
||||
def copy_community_link(self):
|
||||
self.driver.info("Copy community link")
|
||||
self.community_options_button.click()
|
||||
self.share_community_button.click()
|
||||
text = self.sharing_text_native.text
|
||||
self.click_system_back_button(times=2)
|
||||
return text
|
||||
self.community_info_button.click()
|
||||
self.element_starts_with_text('join.status.im/c/').click()
|
||||
community_link_text = self.element_starts_with_text('join.status.im/c/').text
|
||||
self.home_button.double_click()
|
||||
return 'https://%s' % community_link_text
|
||||
|
||||
def handle_membership_request(self, username: str, approve=True):
|
||||
self.driver.info("Handling membership request of user '%s', approve='%s'" % (username, str(approve)))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@@ -290,11 +290,8 @@ class ProfileView(BaseView):
|
||||
self.advertise_device_button = Button(self.driver, accessibility_id="advertise-device")
|
||||
self.sync_all_button = Button(self.driver, translation_id="sync-all-devices")
|
||||
self.syncing_button = Button(self.driver, accessibility_id="icon, Syncing, label-component, icon")
|
||||
self.paired_devices_button = Button(self.driver,
|
||||
accessibility_id="icon, Paired devices, 0 devices, label-component, icon")
|
||||
self.sync_plus_button = Button(
|
||||
self.driver,
|
||||
xpath="//*[@text='Paired devices']/following-sibling::android.view.ViewGroup[@content-desc='icon']")
|
||||
self.sync_plus_button = Button(self.driver,
|
||||
xpath="//*[@text='Syncing']/following-sibling::android.view.ViewGroup[1]")
|
||||
|
||||
# Keycard
|
||||
self.keycard_button = Button(self.driver, accessibility_id="keycard-button")
|
||||
@@ -542,7 +539,6 @@ class ProfileView(BaseView):
|
||||
|
||||
def get_sync_code(self):
|
||||
self.syncing_button.scroll_and_click()
|
||||
self.paired_devices_button.click()
|
||||
self.sync_plus_button.click()
|
||||
for checkbox in Button(
|
||||
self.driver,
|
||||
|
||||
@@ -263,15 +263,11 @@ class SignInView(BaseView):
|
||||
# self.next_button.click()
|
||||
# self.identifiers_button.wait_and_click(30)
|
||||
if enable_notifications:
|
||||
self.enable_notifications_button.wait_and_click()
|
||||
for _ in range(3):
|
||||
self.allow_button.click_if_shown(sec=10)
|
||||
self.enable_notifications_button.click_if_shown()
|
||||
if self.start_button.is_element_displayed():
|
||||
break
|
||||
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
|
||||
if self.allow_button.is_element_displayed():
|
||||
self.allow_button.click()
|
||||
else:
|
||||
self.maybe_later_button.click_until_presence_of_element(self.start_button)
|
||||
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
|
||||
self.start_button.click()
|
||||
self.chats_tab.wait_for_visibility_of_element(30)
|
||||
self.driver.info("## New multiaccount is created successfully!", device=False)
|
||||
@@ -301,7 +297,6 @@ class SignInView(BaseView):
|
||||
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
|
||||
else:
|
||||
self.maybe_later_button.click_until_presence_of_element(self.start_button)
|
||||
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
|
||||
self.start_button.click()
|
||||
self.chats_tab.wait_for_visibility_of_element(30)
|
||||
self.driver.info("## Multiaccount is recovered successfully!", device=False)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from tests import common_password
|
||||
@@ -122,12 +120,7 @@ class WalletView(BaseView):
|
||||
self.login_button.click()
|
||||
|
||||
def confirm_transaction(self):
|
||||
self.confirm_button.click()
|
||||
for _ in range(3):
|
||||
if self.slide_button_track.is_element_displayed():
|
||||
break
|
||||
time.sleep(1)
|
||||
self.confirm_button.click()
|
||||
self.confirm_button.click_until_presence_of_element(self.slide_button_track)
|
||||
self.slide_and_confirm_with_password()
|
||||
|
||||
def set_amount(self, amount: float):
|
||||
@@ -167,6 +160,7 @@ class WalletView(BaseView):
|
||||
self.add_account_button.click()
|
||||
self.add_account_to_watch.click()
|
||||
self.address_to_watch_input.send_keys(address)
|
||||
self.account_has_activity_label.wait_for_visibility_of_element()
|
||||
self.add_account_continue_button.click()
|
||||
SignInView(self.driver).profile_title_input.send_keys(account_name)
|
||||
self.add_watched_address_button.click()
|
||||
|
||||
@@ -186,6 +186,7 @@
|
||||
"balance": "Balance",
|
||||
"begin-set-up": "Begin setup",
|
||||
"below-base-fee": "max fee below base fee",
|
||||
"beta": "Beta",
|
||||
"bio": "Bio",
|
||||
"bio-added": "Bio added",
|
||||
"bio-is-too-long": "Bio is too long",
|
||||
|
||||
Reference in New Issue
Block a user