Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc2f8a8751 | ||
|
|
4f5d2f502f |
+3
-3
@@ -682,11 +682,11 @@ SPEC CHECKSUMS:
|
||||
boost: a7c83b31436843459a1961bfd74b96033dc77234
|
||||
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
|
||||
CryptoSwift: c4f2debceb38bf44c80659afe009f71e23e4a082
|
||||
DoubleConversion: cde416483dac037923206447da6e1454df403714
|
||||
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
|
||||
FBLazyVector: d2db9d00883282819d03bbd401b2ad4360d47580
|
||||
FBReactNativeSpec: 94da4d84ba3b1acf459103320882daa481a2b62d
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 997518ea2aa2d8cd5df9797b641b758d52ecf2bc
|
||||
glog: 9e3310013355e9221591364060e841c28041dfe3
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
||||
@@ -763,4 +763,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: c29de3b14e3275299c51aa95520622f09d084bcb
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
COCOAPODS: 1.12.0
|
||||
|
||||
+14
-2
@@ -32,6 +32,18 @@ in {
|
||||
# For parsing gradle.properties into an attrset
|
||||
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
||||
|
||||
# Clojure formatting tool
|
||||
zprint = super.zprint.override rec {
|
||||
buildGraalvmNativeImage = args: super.buildGraalvmNativeImage ( args // rec {
|
||||
inherit (args) pname;
|
||||
version = "1.2.5";
|
||||
src = self.fetchurl {
|
||||
url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
|
||||
sha256 = "sha256-PWdR5jqyzvTk9HoxqDldwtZNik34dmebBtZZ5vtva4A=";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
# Fix for missing libarclite_macosx.a in Xcode 14.3.
|
||||
# https://github.com/ios-control/ios-deploy/issues/580
|
||||
ios-deploy = super.darwin.ios-deploy.overrideAttrs (old: rec {
|
||||
@@ -48,8 +60,8 @@ in {
|
||||
gradle = super.gradle_6;
|
||||
nodejs = super.nodejs-18_x;
|
||||
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
|
||||
openjdk = super.openjdk11_headless;
|
||||
xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
|
||||
openjdk = super.openjdk8_headless;
|
||||
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
||||
version = "14.0";
|
||||
allowHigher = true;
|
||||
};
|
||||
|
||||
+4
-3
@@ -11,10 +11,11 @@ let
|
||||
# We follow the master branch of official nixpkgs.
|
||||
nixpkgsSrc = fetchFromGitHub {
|
||||
name = "nixpkgs-source";
|
||||
owner = "NixOS";
|
||||
# FIXME: Fork used to get Cocoapods 1.12.0 and apksigner macOS build.
|
||||
owner = "status-im";
|
||||
repo = "nixpkgs";
|
||||
rev = "e7603eba51f2c7820c0a182c6bbb351181caa8e7";
|
||||
sha256 = "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=";
|
||||
rev = "d0c06fa3d3982a91aa01bd63ed84020cbde3d3ab";
|
||||
sha256 = "sha256-8blvuUHnuf0hFr/PpBxVohJp5CaGXIXhgJlFN/cv7us=";
|
||||
# To get the compressed Nix sha256, use:
|
||||
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# by setting android_sdk.accept_license = true.
|
||||
androidenv.composeAndroidPackages {
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "33.0.3";
|
||||
platformToolsVersion = "33.0.2";
|
||||
buildToolsVersions = [ "30.0.0" ];
|
||||
platformVersions = [ "31" ];
|
||||
cmakeVersions = [ "3.18.1" ];
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
mkShell {
|
||||
name = "android-sdk-shell";
|
||||
buildInputs = [ openjdk ];
|
||||
shellHook = ''
|
||||
export JAVA_HOME="${openjdk}"
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{ stdenv }:
|
||||
|
||||
{ version ? "11.1"
|
||||
, allowHigher ? false
|
||||
, xcodeBaseDir ? "/Applications/Xcode.app" }:
|
||||
|
||||
assert stdenv.isDarwin;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xcode-wrapper-${version}${if allowHigher then "-plus" else ""}";
|
||||
# Fix 'xcodebuild: Operation not permitted' when 'sandbox=relaxed' is used.
|
||||
# https://github.com/NixOS/nixpkgs/pull/228696
|
||||
__noChroot = stdenv.isDarwin;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cd $out/bin
|
||||
ln -s /usr/bin/xcode-select
|
||||
ln -s /usr/bin/security
|
||||
ln -s /usr/bin/codesign
|
||||
ln -s /usr/bin/xcrun
|
||||
ln -s /usr/bin/plutil
|
||||
ln -s /usr/bin/clang
|
||||
ln -s /usr/bin/lipo
|
||||
ln -s /usr/bin/file
|
||||
ln -s /usr/bin/rev
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
|
||||
|
||||
cd ..
|
||||
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
|
||||
|
||||
# Check if we have the xcodebuild version that we want
|
||||
currVer=$($out/bin/xcodebuild -version)
|
||||
${if allowHigher then ''
|
||||
if [ -z "$(printf '%s\n' "${version}" "$currVer" | sort -V | head -n1)""" != "${version}" ]
|
||||
'' else ''
|
||||
if [ -z "$(echo $currVer | grep -x 'Xcode ${version}')" ]
|
||||
''}
|
||||
then
|
||||
echo "We require xcodebuild version${if allowHigher then " or higher" else ""}: ${version}"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
+1
-1
@@ -20,7 +20,7 @@ in mkShell {
|
||||
# lint specific utilities
|
||||
clj-kondo zprint
|
||||
# other nice to have stuff
|
||||
yarn nodejs python310
|
||||
yarn nodejs python27
|
||||
] # and some special cases
|
||||
++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ let
|
||||
|
||||
# for 'scripts/generate-keystore.sh'
|
||||
keytool = mkShell {
|
||||
buildInputs = with pkgs; [ openjdk apksigner ];
|
||||
buildInputs = with pkgs; [ openjdk8 apksigner ];
|
||||
};
|
||||
|
||||
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
|
||||
|
||||
@@ -22,27 +22,26 @@
|
||||
opts
|
||||
{:type :default/:success/:error
|
||||
:size :default/:tiny
|
||||
:icon :i/info ;; info message icon
|
||||
:text-color colors/white ;; text color override
|
||||
:icon-color colors/white ;; icon color override
|
||||
:no-icon-color? false ;; disable tint color for icon"
|
||||
:icon :i/info ;; info message icon
|
||||
:text-color colors/white ;; text color override
|
||||
:icon-color colors/white ;; icon color override
|
||||
:no-icon-color? false ;; disable tint color for icon"
|
||||
[{:keys [type size icon text-color icon-color no-icon-color? style]} message]
|
||||
(let [weight (if (= size :default) :regular :medium)
|
||||
icon-size (if (= size :default) 16 12)
|
||||
icon-margin-top (if (= size :default) 2 3)
|
||||
size (if (= size :default) :paragraph-2 :label)
|
||||
text-color (or text-color (get-color type))
|
||||
icon-color (or icon-color text-color)]
|
||||
(let [weight (if (= size :default) :regular :medium)
|
||||
icon-size (if (= size :default) 16 12)
|
||||
size (if (= size :default) :paragraph-2 :label)
|
||||
text-color (or text-color (get-color type))
|
||||
icon-color (or icon-color text-color)]
|
||||
[rn/view
|
||||
{:style (merge {:flex-direction :row}
|
||||
{:style (merge {:flex-direction :row
|
||||
:align-items :center}
|
||||
style)}
|
||||
[quo2.icons/icon icon
|
||||
{:color icon-color
|
||||
:no-color no-icon-color?
|
||||
:size icon-size
|
||||
:container-style {:margin-top icon-margin-top}}]
|
||||
{:color icon-color
|
||||
:no-color no-icon-color?
|
||||
:size icon-size}]
|
||||
[text/text
|
||||
{:size size
|
||||
:weight weight
|
||||
:style {:color text-color
|
||||
:margin-horizontal 8}} message]]))
|
||||
:margin-horizontal 4}} message]]))
|
||||
|
||||
@@ -15,13 +15,15 @@
|
||||
(defn title-input
|
||||
[{:keys [blur?
|
||||
on-change-text
|
||||
auto-focus
|
||||
placeholder
|
||||
max-length
|
||||
default-value
|
||||
override-theme]
|
||||
:or {max-length 0
|
||||
auto-focus false
|
||||
default-value ""}}]
|
||||
(let [focused? (reagent/atom false)
|
||||
(let [focused? (reagent/atom auto-focus)
|
||||
value (reagent/atom default-value)
|
||||
on-change (fn [v]
|
||||
(reset! value v)
|
||||
@@ -40,8 +42,9 @@
|
||||
:default-value default-value
|
||||
:accessibility-label :profile-title-input
|
||||
:keyboard-appearance (theme/theme-value :light :dark override-theme)
|
||||
:on-focus #(swap! focused? (constantly true))
|
||||
:on-blur #(swap! focused? (constantly false))
|
||||
:on-focus #(swap! focused? (fn [] true))
|
||||
:on-blur #(swap! focused? (fn [] false))
|
||||
:auto-focus auto-focus
|
||||
:input-mode :text
|
||||
:on-change-text on-change
|
||||
:editable (not disabled?)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
:on-press #(hide-sheet-and-dispatch [:chat.ui/clear-history chat-id])}])}]))
|
||||
|
||||
(defn delete-chat-action
|
||||
[{:keys [chat-id] :as item} inside-chat?]
|
||||
[{:keys [chat-id] :as item}]
|
||||
(hide-sheet-and-dispatch
|
||||
[:show-bottom-sheet
|
||||
{:content (fn []
|
||||
@@ -81,10 +81,7 @@
|
||||
:context item
|
||||
:accessibility-label :delete-chat-confirm
|
||||
:button-text (i18n/label :t/delete-chat)
|
||||
:on-press (fn []
|
||||
(hide-sheet-and-dispatch [:chat.ui/remove-chat chat-id])
|
||||
(when inside-chat?
|
||||
(rf/dispatch [:navigate-back])))}])}]))
|
||||
:on-press #(hide-sheet-and-dispatch [:chat.ui/remove-chat chat-id])}])}]))
|
||||
|
||||
(defn leave-group-action
|
||||
[item chat-id]
|
||||
@@ -97,10 +94,10 @@
|
||||
:context item
|
||||
:accessibility-label :leave-group
|
||||
:button-text (i18n/label :t/leave-group)
|
||||
:on-press (fn []
|
||||
(hide-sheet-and-dispatch [:group-chats.ui/leave-chat-confirmed
|
||||
chat-id])
|
||||
(rf/dispatch [:navigate-back]))}])}]))
|
||||
:on-press #(do
|
||||
(rf/dispatch [:navigate-back])
|
||||
(hide-sheet-and-dispatch [:group-chats.ui/leave-chat-confirmed
|
||||
chat-id]))}])}]))
|
||||
|
||||
(defn block-user-action
|
||||
[{:keys [public-key] :as item}]
|
||||
@@ -155,10 +152,10 @@
|
||||
:add-divider? true}))
|
||||
|
||||
(defn delete-chat-entry
|
||||
[item inside-chat?]
|
||||
[item]
|
||||
(entry {:icon :i/delete
|
||||
:label (i18n/label :t/delete-chat)
|
||||
:on-press #(delete-chat-action item inside-chat?)
|
||||
:on-press #(delete-chat-action item)
|
||||
:danger? true
|
||||
:accessibility-label :delete-chat
|
||||
:sub-label nil
|
||||
@@ -396,11 +393,11 @@
|
||||
:chevron? false}))
|
||||
|
||||
(defn destructive-actions
|
||||
[{:keys [group-chat] :as item} inside-chat?]
|
||||
[{:keys [group-chat] :as item}]
|
||||
[(clear-history-entry item)
|
||||
(if group-chat
|
||||
(leave-group-entry item nil)
|
||||
(delete-chat-entry item inside-chat?))])
|
||||
(delete-chat-entry item))])
|
||||
|
||||
(defn notification-actions
|
||||
[{:keys [chat-id group-chat public?]} inside-chat?]
|
||||
@@ -434,14 +431,14 @@
|
||||
[[(view-profile-entry chat-id)
|
||||
(edit-nickname-entry chat-id)]
|
||||
(notification-actions item inside-chat?)
|
||||
(destructive-actions item inside-chat?)]])
|
||||
(destructive-actions item)]])
|
||||
|
||||
(defn private-group-chat-actions
|
||||
[item inside-chat?]
|
||||
[quo/action-drawer
|
||||
[(group-actions item inside-chat?)
|
||||
(notification-actions item inside-chat?)
|
||||
(destructive-actions item inside-chat?)]])
|
||||
(destructive-actions item)]])
|
||||
|
||||
(defn contact-actions
|
||||
[{:keys [public-key] :as contact} {:keys [chat-id admin?] :as extra-data}]
|
||||
@@ -474,4 +471,4 @@
|
||||
[quo/action-drawer
|
||||
[(when admin? [(edit-name-image-entry)])
|
||||
[(notifications-entry admin?)]
|
||||
(destructive-actions group false)]]))
|
||||
(destructive-actions group)]]))
|
||||
|
||||
@@ -9,16 +9,14 @@
|
||||
[status-im2.contexts.chat.messages.pin.banner.view :as pin.banner]
|
||||
[status-im2.constants :as constants]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im2.common.home.actions.view :as actions]))
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(defn f-navigation-view
|
||||
[{:keys [scroll-y]}]
|
||||
(let [insets (safe-area/get-insets)
|
||||
status-bar-height (:top insets)
|
||||
{:keys [group-chat chat-id chat-name emoji
|
||||
chat-type]
|
||||
:as chat} (rf/sub [:chats/current-chat-chat-view])
|
||||
chat-type]} (rf/sub [:chats/current-chat-chat-view])
|
||||
all-loaded? (rf/sub [:chats/all-loaded? chat-id])
|
||||
display-name (if (= chat-type constants/one-to-one-chat-type)
|
||||
(first (rf/sub [:contacts/contact-two-names-by-identity chat-id]))
|
||||
@@ -92,16 +90,11 @@
|
||||
:size :paragraph-2
|
||||
:style (style/header-online)}
|
||||
(i18n/label :t/online)])]]]
|
||||
(when (not= chat-type constants/community-chat-type)
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
:style (style/button-container {:margin-right 20})
|
||||
:accessibility-label :options-button
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:show-bottom-sheet
|
||||
{:content (fn [] [actions/chat-actions chat true])}]))}
|
||||
[quo/icon :i/options {:size 20 :color (colors/theme-colors colors/black colors/white)}]])]
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
:style (style/button-container {:margin-right 20})
|
||||
:accessibility-label :options-button}
|
||||
[quo/icon :i/options {:size 20 :color (colors/theme-colors colors/black colors/white)}]]]
|
||||
|
||||
[reanimated/view
|
||||
{:style (style/animated-pinned-banner all-loaded? banner-opacity-animation status-bar-height)}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
[rn/view
|
||||
{:style style/featured-list-container
|
||||
:on-layout #(swap! view-size
|
||||
(fn [_]
|
||||
(fn []
|
||||
(- (oops/oget % "nativeEvent.layout.width") 40)))}
|
||||
(when-not (= @view-size 0)
|
||||
[rn/flat-list
|
||||
|
||||
@@ -9,12 +9,18 @@
|
||||
:margin-right :auto})
|
||||
|
||||
(def button-container
|
||||
{:width "100%"
|
||||
{;:position :absolute
|
||||
;:flex 1
|
||||
:width "100%"
|
||||
:padding-left 20
|
||||
:padding-right 20
|
||||
:padding-top (if platform/android? 0 12)
|
||||
:align-self :flex-end
|
||||
:height 64})
|
||||
:height 64
|
||||
;:bottom 0
|
||||
;:left 0
|
||||
;:right 0
|
||||
})
|
||||
|
||||
(def blur-button-container
|
||||
(merge button-container
|
||||
@@ -28,7 +34,8 @@
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0})
|
||||
:right 0
|
||||
:z-index 100})
|
||||
|
||||
(def info-message
|
||||
{:margin-top 8})
|
||||
|
||||
@@ -48,103 +48,107 @@
|
||||
|
||||
(defn button-container
|
||||
[keyboard-shown? children]
|
||||
(if keyboard-shown?
|
||||
[blur/ios-view
|
||||
{:style style/blur-button-container}
|
||||
children]
|
||||
[rn/view {:style style/view-button-container}
|
||||
children]))
|
||||
[rn/view {:style {:margin-top :auto}}
|
||||
(if keyboard-shown?
|
||||
[blur/ios-view {:style style/blur-button-container}
|
||||
children]
|
||||
[rn/view {:style style/view-button-container}
|
||||
children])])
|
||||
|
||||
(defn- f-page
|
||||
[{:keys [onboarding-profile-data navigation-bar-top]}]
|
||||
(let [{:keys [image-path display-name color]} onboarding-profile-data
|
||||
full-name (reagent/atom display-name)
|
||||
keyboard-shown? (reagent/atom false)
|
||||
validation-msg (reagent/atom (validation-message @full-name))
|
||||
on-change-text (fn [s]
|
||||
(reset! validation-msg (validation-message s))
|
||||
(reset! full-name (string/trim s)))
|
||||
custom-color (reagent/atom (or color c/profile-default-color))
|
||||
profile-pic (reagent/atom image-path)
|
||||
on-change-profile-pic #(reset! profile-pic %)
|
||||
on-change #(reset! custom-color %)]
|
||||
(fn []
|
||||
(rn/use-effect
|
||||
(let [will-show-listener (oops/ocall rn/keyboard
|
||||
"addListener"
|
||||
"keyboardWillShow"
|
||||
#(swap! keyboard-shown? (constantly true)))
|
||||
will-hide-listener (oops/ocall rn/keyboard
|
||||
"addListener"
|
||||
"keyboardWillHide"
|
||||
#(swap! keyboard-shown? (constantly false)))]
|
||||
(fn []
|
||||
(fn []
|
||||
(oops/ocall will-show-listener "remove")
|
||||
(oops/ocall will-hide-listener "remove"))))
|
||||
[])
|
||||
(reagent/with-let [keyboard-shown? (reagent/atom false)
|
||||
will-show-listener (oops/ocall rn/keyboard
|
||||
"addListener"
|
||||
"keyboardWillShow"
|
||||
#(reset! keyboard-shown? true))
|
||||
will-hide-listener (oops/ocall rn/keyboard
|
||||
"addListener"
|
||||
"keyboardWillHide"
|
||||
#(reset! keyboard-shown? false))
|
||||
{:keys [image-path display-name color]} onboarding-profile-data
|
||||
full-name (reagent/atom display-name)
|
||||
validation-msg (reagent/atom (validation-message @full-name))
|
||||
on-change-text (fn [s]
|
||||
(reset! validation-msg (validation-message s))
|
||||
(reset! full-name (string/trim s)))
|
||||
custom-color (reagent/atom (or color c/profile-default-color))
|
||||
profile-pic (reagent/atom image-path)
|
||||
on-change-profile-pic #(reset! profile-pic %)
|
||||
on-change #(reset! custom-color %)]
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar/navigation-bar {:top navigation-bar-top}]
|
||||
[rn/scroll-view
|
||||
{:keyboard-should-persist-taps :always
|
||||
:content-container-style {:flex-grow 1}}
|
||||
[rn/view {:style style/page-container}
|
||||
[navigation-bar/navigation-bar {:top navigation-bar-top}]
|
||||
[rn/scroll-view
|
||||
{:keyboard-should-persist-taps :always
|
||||
:content-container-style {:flex-grow 1}}
|
||||
[rn/view {:style style/page-container}
|
||||
[rn/view
|
||||
{:style style/content-container}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style style/title} (i18n/label :t/create-profile)]
|
||||
[rn/view
|
||||
{:style style/input-container}
|
||||
[rn/view
|
||||
{:style style/content-container}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style style/title} (i18n/label :t/create-profile)]
|
||||
[rn/view
|
||||
{:style style/input-container}
|
||||
[rn/view
|
||||
{:style style/profile-input-container}
|
||||
[quo/profile-input
|
||||
{:customization-color @custom-color
|
||||
:placeholder (i18n/label :t/your-name)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch
|
||||
[:show-bottom-sheet
|
||||
{:override-theme :dark
|
||||
:content
|
||||
(fn []
|
||||
[method-menu/view on-change-profile-pic])}]))
|
||||
:image-picker-props {:profile-picture @profile-pic
|
||||
:full-name @full-name}
|
||||
:title-input-props {:default-value @full-name
|
||||
:max-length c/profile-name-max-length
|
||||
:on-change-text on-change-text}}]]
|
||||
(when @validation-msg
|
||||
[quo/info-message
|
||||
{:type :error
|
||||
:size :default
|
||||
:icon :i/info
|
||||
:style style/info-message}
|
||||
@validation-msg])
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:style style/color-title}
|
||||
(i18n/label :t/accent-colour)]
|
||||
[quo/color-picker
|
||||
{:blur? true
|
||||
:default-selected? :blue
|
||||
:selected @custom-color
|
||||
:on-change on-change}]]]]]
|
||||
[rn/keyboard-avoiding-view {}
|
||||
[button-container @keyboard-shown?
|
||||
[quo/button
|
||||
{:accessibility-label :submit-create-profile-button
|
||||
:type :primary
|
||||
:override-background-color (colors/custom-color @custom-color 60)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:onboarding-2/profile-data-set
|
||||
{:image-path @profile-pic
|
||||
:display-name @full-name
|
||||
:color @custom-color}]))
|
||||
:style style/continue-button
|
||||
:disabled (or (not (seq @full-name)) @validation-msg)}
|
||||
(i18n/label :t/continue)]]]])))
|
||||
{:style style/profile-input-container}
|
||||
[quo/profile-input
|
||||
{:customization-color @custom-color
|
||||
:placeholder (i18n/label :t/your-name)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch
|
||||
[:show-bottom-sheet
|
||||
{:override-theme :dark
|
||||
:content
|
||||
(fn []
|
||||
[method-menu/view on-change-profile-pic])}]))
|
||||
:image-picker-props {:profile-picture @profile-pic
|
||||
:full-name @full-name}
|
||||
:title-input-props {:default-value @full-name
|
||||
:auto-focus true
|
||||
:max-length c/profile-name-max-length
|
||||
:on-change-text on-change-text}}]]
|
||||
(when @validation-msg
|
||||
[quo/info-message
|
||||
{:type :error
|
||||
:size :default
|
||||
:icon :i/info
|
||||
:style style/info-message}
|
||||
@validation-msg])
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style style/color-title}
|
||||
(i18n/label :t/accent-colour)]
|
||||
[quo/color-picker
|
||||
{:blur? true
|
||||
:default-selected? :blue
|
||||
:selected @custom-color
|
||||
:on-change on-change}]]]]]
|
||||
[rn/keyboard-avoiding-view {:style {:position :absolute
|
||||
:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0}
|
||||
:pointer-events :box-none}
|
||||
[button-container @keyboard-shown?
|
||||
[quo/button
|
||||
{:accessibility-label :submit-create-profile-button
|
||||
:type :primary
|
||||
:override-background-color (colors/custom-color @custom-color 60)
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:onboarding-2/profile-data-set
|
||||
{:image-path @profile-pic
|
||||
:display-name @full-name
|
||||
:color @custom-color}]))
|
||||
:style style/continue-button
|
||||
:disabled (or (not (seq @full-name)) @validation-msg)}
|
||||
(i18n/label :t/continue)]]]]
|
||||
(finally
|
||||
(oops/ocall will-show-listener "remove")
|
||||
(oops/ocall will-hide-listener "remove"))
|
||||
))
|
||||
|
||||
(defn create-profile
|
||||
[]
|
||||
|
||||
@@ -87,12 +87,8 @@
|
||||
:orientation ["portrait"]
|
||||
:backgroundColor :transparent}
|
||||
:modalPresentationStyle :overCurrentContext
|
||||
;; disabled on iOS in debug mode:
|
||||
;; https://github.com/status-im/status-mobile/pull/16053#issuecomment-1568349702
|
||||
:animations (if (or platform/android? (not js/goog.DEBUG))
|
||||
{:showModal {:alpha {:from 1 :to 1 :duration 300}}
|
||||
:dismissModal {:alpha {:from 1 :to 1 :duration 300}}}
|
||||
{})})
|
||||
:animations {:showModal {:alpha {:from 1 :to 1 :duration 300}}
|
||||
:dismissModal {:alpha {:from 1 :to 1 :duration 300}}}})
|
||||
|
||||
(def dark-screen
|
||||
(merge (statusbar true)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.154.5",
|
||||
"commit-sha1": "92b5d831fe25fd2b0397519a1073a53e0be87289",
|
||||
"src-sha256": "004pm4k090lw35kbfag0wjs815y68k61h3g6kydzpzkbmxrrfzd9"
|
||||
"version": "v0.154.2",
|
||||
"commit-sha1": "5d62a9eef4a6676d62a9a51cdadea596d3d9a658",
|
||||
"src-sha256": "148z0r8iyqanx91hgvbm7wx1nf82v2am1hyy6f892vmbc2y8axnx"
|
||||
}
|
||||
|
||||
@@ -210,7 +210,6 @@ class TestrailReport(BaseTestReport):
|
||||
'status_id': self.outcomes['undefined_fail'] if last_testrun.error else self.outcomes['passed'],
|
||||
'comment': comment})
|
||||
|
||||
print("RESULTS:\n%s" % "\n".join(str(i) for i in data))
|
||||
results = self.post('add_results_for_cases/%s' % self.run_id, data={"results": data})
|
||||
try:
|
||||
results[0]
|
||||
|
||||
@@ -312,7 +312,6 @@ def create_shared_drivers(quantity):
|
||||
return drivers, loop
|
||||
except MaxRetryError as e:
|
||||
test_suite_data.current_test.testruns[-1].error = e.reason
|
||||
raise e
|
||||
|
||||
|
||||
class LocalSharedMultipleDeviceTestCase(AbstractTestCase):
|
||||
@@ -372,14 +371,11 @@ class SauceSharedMultipleDeviceTestCase(AbstractTestCase):
|
||||
'%s_geth%s.log' % (test_suite_data.current_test.name, str(self.drivers[driver].number)))
|
||||
geth_contents.append(self.pull_geth(self.drivers[driver]))
|
||||
|
||||
except (WebDriverException, AttributeError, RemoteDisconnected):
|
||||
except (WebDriverException, AttributeError):
|
||||
pass
|
||||
finally:
|
||||
try:
|
||||
geth = {geth_names[i]: geth_contents[i] for i in range(len(geth_names))}
|
||||
test_suite_data.current_test.geth_paths = self.github_report.save_geth(geth)
|
||||
except IndexError:
|
||||
pass
|
||||
geth = {geth_names[i]: geth_contents[i] for i in range(len(geth_names))}
|
||||
test_suite_data.current_test.geth_paths = self.github_report.save_geth(geth)
|
||||
|
||||
@pytest.fixture(scope='class', autouse=True)
|
||||
def prepare(self, request):
|
||||
@@ -394,30 +390,28 @@ class SauceSharedMultipleDeviceTestCase(AbstractTestCase):
|
||||
from tests.conftest import sauce
|
||||
requests_session = requests.Session()
|
||||
requests_session.auth = (sauce_username, sauce_access_key)
|
||||
if cls.drivers:
|
||||
for _, driver in cls.drivers.items():
|
||||
session_id = driver.session_id
|
||||
for _, driver in cls.drivers.items():
|
||||
session_id = driver.session_id
|
||||
try:
|
||||
sauce.jobs.update_job(username=sauce_username, job_id=session_id, name=cls.__name__)
|
||||
except (RemoteDisconnected, SauceException):
|
||||
pass
|
||||
try:
|
||||
driver.quit()
|
||||
except WebDriverException:
|
||||
pass
|
||||
url = 'https://api.%s/rest/v1/%s/jobs/%s/assets/%s' % (apibase, sauce_username, session_id, "log.json")
|
||||
WebDriverWait(driver, 60, 2).until(lambda _: requests_session.get(url).status_code == 200)
|
||||
commands = requests_session.get(url).json()
|
||||
for command in commands:
|
||||
try:
|
||||
sauce.jobs.update_job(username=sauce_username, job_id=session_id, name=cls.__name__)
|
||||
except (RemoteDisconnected, SauceException):
|
||||
pass
|
||||
try:
|
||||
driver.quit()
|
||||
except WebDriverException:
|
||||
pass
|
||||
url = 'https://api.%s/rest/v1/%s/jobs/%s/assets/%s' % (apibase, sauce_username, session_id, "log.json")
|
||||
WebDriverWait(driver, 60, 2).until(lambda _: requests_session.get(url).status_code == 200)
|
||||
commands = requests_session.get(url).json()
|
||||
for command in commands:
|
||||
try:
|
||||
if command['message'].startswith("Started "):
|
||||
for test in test_suite_data.tests:
|
||||
if command['message'] == "Started %s" % test.name:
|
||||
test.testruns[-1].first_commands[session_id] = commands.index(command) + 1
|
||||
except KeyError:
|
||||
continue
|
||||
if cls.loop:
|
||||
cls.loop.close()
|
||||
if command['message'].startswith("Started "):
|
||||
for test in test_suite_data.tests:
|
||||
if command['message'] == "Started %s" % test.name:
|
||||
test.testruns[-1].first_commands[session_id] = commands.index(command) + 1
|
||||
except KeyError:
|
||||
continue
|
||||
cls.loop.close()
|
||||
for test in test_suite_data.tests:
|
||||
cls.github_report.save_test(test)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import time
|
||||
|
||||
import emoji
|
||||
import pytest
|
||||
from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
||||
from selenium.common.exceptions import TimeoutException
|
||||
|
||||
from tests import marks, common_password, run_in_parallel
|
||||
from tests.base_test_case import MultipleSharedDeviceTestCase, create_shared_drivers
|
||||
@@ -453,6 +453,7 @@ class TestContactBlockMigrateKeycardMultipleSharedDevices(MultipleSharedDeviceTe
|
||||
self.errors.append('Contact is shown in Profile after removing user from contacts')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
@marks.testrail_id(702188)
|
||||
@marks.xfail(
|
||||
reason="flaky; issue when sometimes history is not fetched from offline for public chat, needs investigation")
|
||||
@@ -839,7 +840,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
'username': self.username_2}))))
|
||||
self.home_1, self.home_2 = self.device_1.get_home_view(), self.device_2.get_home_view()
|
||||
self.homes = (self.home_1, self.home_2)
|
||||
self.profile_1, self.profile_2 = (home.get_profile_view() for home in self.homes)
|
||||
self.profile_1, self.profile_2 = (home.get_profile_view() for home in self.homes)
|
||||
self.public_key_2 = self.home_2.get_public_key()
|
||||
|
||||
self.profile_1.just_fyi("Sending contact request via Profile > Contacts")
|
||||
@@ -926,7 +927,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
self.home_2.just_fyi("Check 'Open in Status' option")
|
||||
url_message = 'http://status.im'
|
||||
self.chat_1.send_message(url_message)
|
||||
self.chat_2.element_starts_with_text(url_message, 'button').wait_for_visibility_of_element(120)
|
||||
self.chat_2.element_starts_with_text(url_message, 'button').click_inside_element_by_coordinate(0.2, 0.5)
|
||||
web_view = self.chat_2.open_in_status_button.click()
|
||||
if not web_view.element_by_text('Private, Secure Communication').is_element_displayed(60):
|
||||
@@ -934,7 +934,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.xfail(reason="Pin feature is in development", run=False)
|
||||
@marks.testrail_id(702731)
|
||||
def test_1_1_chat_pin_messages(self):
|
||||
self.home_1.just_fyi("Check that Device1 can pin own message in 1-1 chat")
|
||||
@@ -1035,23 +1034,19 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
|
||||
self.chat_2.just_fyi("Send messages with non-latin symbols")
|
||||
self.home_1.jump_to_card_by_text(self.username_2)
|
||||
self.chat_1.send_message("just a text") # Sending a message here so the next ones will be in a separate line
|
||||
messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥']
|
||||
[self.chat_2.send_message(message) for message in messages]
|
||||
for message in messages:
|
||||
if not self.chat_1.chat_element_by_text(message).is_element_displayed():
|
||||
self.errors.append("Message with text '%s' was not received" % message)
|
||||
self.errors.append("Message with test '%s' was not received" % message)
|
||||
|
||||
self.chat_2.just_fyi("Checking updated member photo, timestamp and username on message")
|
||||
self.chat_2.hide_keyboard_if_shown()
|
||||
try:
|
||||
timestamp = self.chat_2.chat_element_by_text(messages[0]).timestamp
|
||||
sent_time_variants = self.chat_2.convert_device_time_to_chat_timestamp()
|
||||
if timestamp not in sent_time_variants:
|
||||
self.errors.append(
|
||||
'Timestamp on message %s does not correspond expected [%s]' % (timestamp, *sent_time_variants))
|
||||
except NoSuchElementException:
|
||||
self.errors.append("No timestamp on message %s" % messages[0])
|
||||
timestamp = self.chat_2.chat_element_by_text(messages[0]).timestamp
|
||||
sent_time_variants = self.chat_2.convert_device_time_to_chat_timestamp()
|
||||
if timestamp not in sent_time_variants:
|
||||
self.errors.append(
|
||||
'Timestamp on message %s does not correspond expected [%s]' % (timestamp, *sent_time_variants))
|
||||
for message in [messages[1], messages[2]]:
|
||||
if self.chat_2.chat_element_by_text(message).member_photo.is_element_displayed():
|
||||
self.errors.append('%s is not stack to 1st(they are sent in less than 5 minutes)!' % message)
|
||||
@@ -1192,7 +1187,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
||||
[device.click_system_back_button_until_element_is_shown() for device in (self.device_1, self.device_2)]
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.xfail(reason="Issue with messages not being sent for a long time")
|
||||
@marks.testrail_id(702783)
|
||||
def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self):
|
||||
self.chat_2.jump_to_card_by_text(self.username_1)
|
||||
|
||||
@@ -257,7 +257,6 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
|
||||
self.errors.append('%s if not shown for device %s' % (message, str(i)))
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.xfail(reason="Pin feature is in development", run=False)
|
||||
@marks.testrail_id(702732)
|
||||
def test_group_chat_pin_messages(self):
|
||||
[self.homes[i].click_system_back_button_until_element_is_shown() for i in range(3)]
|
||||
|
||||
@@ -4,13 +4,13 @@ from datetime import timedelta
|
||||
import emoji
|
||||
import pytest
|
||||
from dateutil import parser
|
||||
from selenium.common.exceptions import NoSuchElementException, TimeoutException
|
||||
from selenium.common.exceptions import NoSuchElementException
|
||||
|
||||
from tests import marks, test_dapp_name, test_dapp_url, run_in_parallel
|
||||
from tests import marks, test_dapp_name, test_dapp_url, run_in_parallel, common_password
|
||||
from tests.base_test_case import create_shared_drivers, MultipleSharedDeviceTestCase
|
||||
from views.chat_view import CommunityView
|
||||
from views.dbs.waku_backup import user as waku_user
|
||||
from views.sign_in_view import SignInView
|
||||
from views.dbs.waku_backup import user as waku_user
|
||||
|
||||
|
||||
@pytest.mark.xdist_group(name="three_1")
|
||||
@@ -342,8 +342,7 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.channel.copy_message_text(message)
|
||||
actual_copied_text = self.channel.driver.get_clipboard_text()
|
||||
if actual_copied_text != message:
|
||||
self.errors.append(
|
||||
'Message %s text was not copied in community channel, text in clipboard %s' % actual_copied_text)
|
||||
self.errors.append('Message %s text was not copied in community channel, text in clipboard %s' % actual_copied_text)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@@ -444,6 +443,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.channel_2 = self.community_2.get_channel(self.channel_name).click()
|
||||
|
||||
@marks.testrail_id(702838)
|
||||
@marks.xfail(reason="blocked by 14797")
|
||||
def test_community_message_send_check_timestamps_sender_username(self):
|
||||
message = self.text_message
|
||||
sent_time_variants = self.channel_1.convert_device_time_to_chat_timestamp()
|
||||
@@ -499,12 +499,13 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.home_1.just_fyi('Send image in 1-1 chat from Gallery')
|
||||
image_description = 'description'
|
||||
self.channel_1.send_images_with_description(image_description)
|
||||
self.channel_1.chat_message_input.click()
|
||||
self.channel_1.chat_element_by_text(image_description).image_in_message.click()
|
||||
self.channel_1.click_system_back_button()
|
||||
# TODO: possible after adding proper accessibility-id to 1 image in chat
|
||||
# self.channel_1.chat_message_input.click()
|
||||
# self.channel_1.chat_element_by_text(image_description).image_in_message.click()
|
||||
# self.channel_1.click_system_back_button()
|
||||
|
||||
# TODO: options for image are still WIP; add case with edit description of image and after 15901 fix
|
||||
self.home_2.just_fyi('check image, description and options for receiver')
|
||||
# self.home_2.just_fyi('check image, description and options for receiver')
|
||||
# self.channel_2.chat_element_by_text(image_description).image_in_message.click()
|
||||
# self.home_1.just_fyi('save image')
|
||||
# self.chat_1.save_image_button.click_until_presence_of_element(self.chat_1.show_images_button)
|
||||
@@ -530,10 +531,6 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
#
|
||||
# self.channel_2.chat_element_by_text(image_description).image_in_message.save_new_screenshot_of_element('images_test.png')
|
||||
|
||||
if not self.channel_2.chat_element_by_text(
|
||||
image_description).image_in_message.is_element_image_similar_to_template('image_sent_in_community.png'):
|
||||
self.errors.append("Not expected image is shown to the receiver")
|
||||
|
||||
self.channel_2.just_fyi("Can reply to images")
|
||||
self.channel_2.quote_message(image_description)
|
||||
message_text = 'reply to image'
|
||||
@@ -554,8 +551,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.channel_2.just_fyi("Check gallery on second device")
|
||||
self.channel_2.jump_to_communities_home()
|
||||
self.home_2.get_to_community_channel_from_home(self.community_name)
|
||||
if self.channel_2.chat_element_by_text(
|
||||
image_description).image_container_in_message.is_element_differs_from_template(file_name, 5):
|
||||
if self.channel_2.chat_element_by_text(image_description).image_container_in_message.is_element_differs_from_template(file_name, 5):
|
||||
self.errors.append("Gallery message do not match the template!")
|
||||
|
||||
self.channel_2.just_fyi("Can reply to gallery")
|
||||
@@ -597,66 +593,67 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
@marks.testrail_id(702844)
|
||||
def test_community_links_with_previews_github_youtube_twitter_gif_send_enable(self):
|
||||
preview_urls = {
|
||||
# TODO: disabled because of the bug in 15891
|
||||
# 'giphy':{'url': 'https://giphy.com/gifs/this-is-fine-QMHoU66sBXqqLqYvGO',
|
||||
# 'title': 'This Is Fine GIF - Find & Share on GIPHY',
|
||||
# 'description': 'Discover & share this Meme GIF with everyone you know. GIPHY is how you search, share, discover, and create GIFs.',
|
||||
# 'link': 'giphy.com'},
|
||||
'github_pr': {'url': 'https://github.com/status-im/status-mobile/pull/11707',
|
||||
'title': 'Update translations by jinhojang6 · Pull Request #11707 · status-im/status-mobile',
|
||||
'description': 'Update translation json files of 19 languages.',
|
||||
'link': 'github.com'},
|
||||
'yotube_short': {
|
||||
'url': 'https://youtu.be/Je7yErjEVt4',
|
||||
'title': 'Status, your gateway to Ethereum',
|
||||
'description': 'Learn more at https://status.im. This video aims to provide an explanation '
|
||||
'and brief preview of the utility that will be supported by the Status App - provid...',
|
||||
'link': 'youtu.be'},
|
||||
'yotube_full': {
|
||||
'url': 'https://www.youtube.com/watch?v=XN-SVmuJH2g&list=PLbrz7IuP1hrgNtYe9g6YHwHO6F3OqNMao',
|
||||
'title': 'Status & Keycard – Hardware-Enforced Security',
|
||||
'description': 'With Status and Keycard, you can enable hardware enforced authorizations to '
|
||||
'your Status account and transactions. Two-factor authentication to access your ac...',
|
||||
'link': 'www.youtube.com'},
|
||||
'yotube_mobile': {
|
||||
'url': 'https://m.youtube.com/watch?v=Je7yErjEVt4',
|
||||
'title': 'Status, your gateway to Ethereum',
|
||||
'description': 'Learn more at https://status.im. This video aims to provide an explanation '
|
||||
'and brief preview of the utility that will be supported by the Status App - provid...',
|
||||
'link': 'm.youtube.com',
|
||||
},
|
||||
# TODO: disabled because of the bug in 15891
|
||||
# 'giphy':{'url': 'https://giphy.com/gifs/this-is-fine-QMHoU66sBXqqLqYvGO',
|
||||
# 'title': 'This Is Fine GIF - Find & Share on GIPHY',
|
||||
# 'description': 'Discover & share this Meme GIF with everyone you know. GIPHY is how you search, share, discover, and create GIFs.',
|
||||
# 'link': 'giphy.com'},
|
||||
'github_pr': {'url': 'https://github.com/status-im/status-mobile/pull/11707',
|
||||
'title': 'Update translations by jinhojang6 · Pull Request #11707 · status-im/status-mobile',
|
||||
'description': 'Update translation json files of 19 languages.',
|
||||
'link': 'github.com'},
|
||||
'yotube_short': {
|
||||
'url': 'https://youtu.be/Je7yErjEVt4',
|
||||
'title': 'Status, your gateway to Ethereum',
|
||||
'description': 'Learn more at https://status.im. This video aims to provide an explanation '
|
||||
'and brief preview of the utility that will be supported by the Status App - provid...',
|
||||
'link': 'youtu.be'},
|
||||
'yotube_full': {
|
||||
'url': 'https://www.youtube.com/watch?v=XN-SVmuJH2g&list=PLbrz7IuP1hrgNtYe9g6YHwHO6F3OqNMao',
|
||||
'title': 'Status & Keycard – Hardware-Enforced Security',
|
||||
'description': 'With Status and Keycard, you can enable hardware enforced authorizations to '
|
||||
'your Status account and transactions. Two-factor authentication to access your ac...',
|
||||
'link': 'www.youtube.com'},
|
||||
'yotube_mobile': {
|
||||
'url': 'https://m.youtube.com/watch?v=Je7yErjEVt4',
|
||||
'title': 'Status, your gateway to Ethereum',
|
||||
'description': 'Learn more at https://status.im. This video aims to provide an explanation '
|
||||
'and brief preview of the utility that will be supported by the Status App - provid...',
|
||||
'link': 'm.youtube.com',
|
||||
},
|
||||
|
||||
# twitter link is temporary removed from check as current xpath locator in message.preview_title is not applicable for this type of links
|
||||
# 'twitter': {
|
||||
# 'url': 'https://twitter.com/ethdotorg/status/1445161651771162627?s=20',
|
||||
# 'txt': "We've rethought how we translate content, allowing us to translate",
|
||||
# 'subtitle': 'Twitter'
|
||||
# }
|
||||
}
|
||||
# twitter link is temporary removed from check as current xpath locator in message.preview_title is not applicable for this type of links
|
||||
# 'twitter': {
|
||||
# 'url': 'https://twitter.com/ethdotorg/status/1445161651771162627?s=20',
|
||||
# 'txt': "We've rethought how we translate content, allowing us to translate",
|
||||
# 'subtitle': 'Twitter'
|
||||
# }
|
||||
}
|
||||
|
||||
for key, data in preview_urls.items():
|
||||
|
||||
for key in preview_urls:
|
||||
self.home_2.just_fyi("Checking %s preview case" % key)
|
||||
data = preview_urls[key]
|
||||
url = data['url']
|
||||
self.channel_2.chat_message_input.set_value(url)
|
||||
self.channel_2.url_preview_composer.wait_for_element(20)
|
||||
shown_title = self.channel_2.url_preview_composer_text.text
|
||||
if shown_title != data['title']:
|
||||
self.errors.append("Preview text is not expected, it is '%s'" % shown_title)
|
||||
if self.channel_2.url_preview_composer_text.text != data['title']:
|
||||
self.errors.append(
|
||||
"Preview text is not expected, it is '%s'" % self.channel_2.url_preview_composer_text.text)
|
||||
self.channel_2.send_message_button.click()
|
||||
self.channel_1.get_preview_message_by_text(url).wait_for_element(60)
|
||||
message = self.channel_1.get_preview_message_by_text(url)
|
||||
# if not message.preview_image:
|
||||
# self.errors.append("No preview is shown for %s" % link_data['url'])
|
||||
shown_title = message.preview_title.text
|
||||
if shown_title != data['title']:
|
||||
self.errors.append("Title is not equal expected for '%s', actual is '%s'" % (url, shown_title))
|
||||
shown_description = message.preview_subtitle.text
|
||||
if shown_description != data['description']:
|
||||
if message.preview_title.text != data['title']:
|
||||
self.errors.append("Title is not equal expected for '%s', actual is '%s'" % (url, message.preview_title.text))
|
||||
|
||||
if message.preview_subtitle.text != data['description']:
|
||||
self.errors.append(
|
||||
"Description is not equal expected for '%s', actual is '%s'" % (url, shown_description))
|
||||
shown_link = message.preview_link.text
|
||||
if shown_link != data['link']:
|
||||
self.errors.append("Link is not equal expected for '%s', actual is '%s'" % (url, shown_link))
|
||||
"Description is not equal expected for '%s', actual is '%s'" % (url, message.preview_subtitle.text))
|
||||
|
||||
if message.preview_link.text != data['link']:
|
||||
self.errors.append("Link is not equal expected for '%s', actual is '%s'" % (url, message.preview_link.text))
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@@ -746,14 +743,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
self.home_2.just_fyi("Check message in 1-1 chat after unblock")
|
||||
self.home_2.get_chat(self.username_1).click()
|
||||
self.chat_2.send_message(message_unblocked)
|
||||
try:
|
||||
self.chat_2.chat_element_by_text(message_unblocked).wait_for_status_to_be(expected_status='Delivered',
|
||||
timeout=120)
|
||||
if not self.chat_1.chat_element_by_text(message_unblocked).is_element_displayed(30):
|
||||
self.errors.append("Message was not received in 1-1 chat after user unblock!")
|
||||
except TimeoutException:
|
||||
self.errors.append('Message was not delivered after back up online.')
|
||||
|
||||
if not self.chat_1.chat_element_by_text(message_unblocked).is_element_displayed(30):
|
||||
self.errors.append("Message was not received in 1-1 chat after user unblock!")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(703086)
|
||||
@@ -768,14 +759,13 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
community_1_element.long_press_until_element_is_shown(mark_as_read_button)
|
||||
mark_as_read_button.click()
|
||||
if community_1_element.new_messages_public_chat.is_element_displayed():
|
||||
self.errors.append(
|
||||
'Unread messages badge is shown in community channel while there are no unread messages')
|
||||
# TODO: there should be one more check for community channel, which is still not ready
|
||||
self.errors.append('Unread messages badge is shown in community channel while there are no unread messages')
|
||||
# TODO: there should be one more check for community channel, which is still not ready
|
||||
|
||||
# self.community_1.click_system_back_button_until_element_is_shown()
|
||||
# community_1_element = self.home_1.get_chat(self.community_name, community=True)
|
||||
# if community_1_element.new_messages_community.is_element_displayed():
|
||||
# self.errors.append('New messages community badge is shown on community after marking messages as read')
|
||||
# self.community_1.click_system_back_button_until_element_is_shown()
|
||||
# community_1_element = self.home_1.get_chat(self.community_name, community=True)
|
||||
# if community_1_element.new_messages_community.is_element_displayed():
|
||||
# self.errors.append('New messages community badge is shown on community after marking messages as read')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(702786)
|
||||
@@ -800,8 +790,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
if self.channel_1.chat_message_input.is_element_displayed():
|
||||
self.errors.append("Message with the mention is not shown in the chat for the admin")
|
||||
else:
|
||||
self.errors.append(
|
||||
"Channel did not open by clicking on a notification with the mention for admin")
|
||||
self.errors.append("Channel did not open by clicking on a notification with the mention for admin")
|
||||
else:
|
||||
self.errors.append("Push notification with the mention was not received by admin")
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ class ChatElementByText(Text):
|
||||
try:
|
||||
self.driver.info("Trying to access image inside message with text '%s'" % self.message_text)
|
||||
ChatElementByText(self.driver, self.message_text).wait_for_sent_state(60)
|
||||
return Button(self.driver, xpath="%s//*[@content-desc='image-message']" % self.locator)
|
||||
return Button(self.driver, xpath='%s//android.view.ViewGroup/android.widget.ImageView' % self.locator)
|
||||
except NoSuchElementException:
|
||||
self.driver.fail("No image is found in message!")
|
||||
|
||||
@@ -996,9 +996,10 @@ class ChatView(BaseView):
|
||||
|
||||
def set_reaction(self, message: str, emoji: str = 'thumbs-up', emoji_message=False):
|
||||
self.driver.info("Setting '%s' reaction" % emoji)
|
||||
key = emojis[emoji]
|
||||
# Audio message is obvious should be tapped not on audio-scroll-line
|
||||
# so we tap on its below element as exception here (not the case for link/tag message!)
|
||||
element = Button(self.driver, accessibility_id='reaction-%s' % emoji)
|
||||
element = Button(self.driver, accessibility_id='emoji-picker-%s' % key)
|
||||
if message == 'audio':
|
||||
self.audio_message_in_chat_timer.long_press_element()
|
||||
else:
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 172 KiB |
@@ -1527,7 +1527,7 @@
|
||||
"your-data-belongs-to-you": "If you lose your seed phrase you lose your data and funds",
|
||||
"your-data-belongs-to-you-description": "If you lose access, for example by losing your phone, you can only access your keys with your seed phrase. No one, but you has your seed phrase. Write it down. Keep it safe",
|
||||
"your-identifiers": "Your identicon ring, chat key and emojihash will help others tell you from impersonators",
|
||||
"your-name": "Your Name",
|
||||
"your-name": "Your name",
|
||||
"your-recovery-phrase": "Your seed phrase",
|
||||
"your-recovery-phrase-description": "This is your seed phrase. You use it to prove that this is your wallet. You only get to see it once! Write it on paper and keep it in a secure place. You will need it if you lose or reinstall your wallet.",
|
||||
"custom-seed-phrase": "Invalid seed phrase",
|
||||
|
||||
Reference in New Issue
Block a user