Compare commits

..
56 changed files with 202 additions and 614 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.5'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -3
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.3'
pipeline {
agent { label 'linux' }
@@ -8,8 +8,6 @@ pipeline {
disableConcurrentBuilds()
/* Prevent Jenkins jobs from running forever */
timeout(time: 40, unit: 'MINUTES')
/* Allow copying of artifacts from this job. */
copyArtifactPermission('/status-mobile/e2e/*')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '10',
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.5'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.3'
pipeline {
agent { label params.AGENT_LABEL }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+6 -12
View File
@@ -1,5 +1,3 @@
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label 'linux' }
@@ -20,17 +18,13 @@ pipeline {
disableConcurrentBuilds()
}
stages {
stage('Fetch') {
when { expression { !params.APK_URL } }
stage('Prep') {
steps { script {
copyArtifacts(
projectName: "status-mobile/nightly",
filter: '*-x86.apk',
/* WARNING: This copies the latest available artifact. */
selector: lastWithArtifacts(),
)
apk_path = "${env.WORKSPACE}/${utils.findFile('*-x86.apk')}"
if (params.PR_ID == null) {
error("PR_ID parameter not set!")
}
} }
}
@@ -79,7 +73,7 @@ pipeline {
-m testrail_id \
-m \"new_ui_critical or new_ui_medium\" \
-k \"${params.KEYWORD_EXPRESSION}\" \
--apk=${params.APK_URL ?: apk_path}
--apk=${params.APK_NAME}
"""
}
}
+3 -9
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.5'
pipeline {
@@ -14,10 +14,6 @@ pipeline {
name: 'PR_ID',
description: 'ID of the Pull Request triggering this build.',
)
string(
name: 'APK_URL',
description: 'Optional, set if job require APK to be downloaded from URL.',
)
string(
name: 'KEYWORD_EXPRESSION',
description: 'This will run tests which contain names that match the given string expression (Optional)',
@@ -58,11 +54,9 @@ pipeline {
}
stage('Fetch') {
when { expression { !params.APK_URL } }
steps { script {
steps { script { /* WARNING: This copies the latest available artifact. */
copyArtifacts(
projectName: "status-mobile/prs/android-e2e/PR-${params.PR_ID}",
/* WARNING: This copies the latest available artifact. */
selector: lastWithArtifacts(),
)
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*.apk')}"
@@ -125,7 +119,7 @@ pipeline {
--rerun_count=2 \
--testrail_report=True \
-k \"${params.KEYWORD_EXPRESSION}\" \
--apk=${params.APK_URL ?: apk_path} \
--apk=${apk_path} \
--build=PR-${params.PR_ID}-${utils.timestamp()} \
--pr_number=${params.PR_ID} \
${extraPytestOpts}
-2
View File
@@ -1,5 +1,3 @@
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label 'linux' }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.3'
pipeline {
agent { label 'macos' }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.6'
library 'status-jenkins-lib@v1.6.3'
pipeline {
agent { label 'linux' }
+7 -8
View File
@@ -27,10 +27,12 @@ The most important thing is that
status-mobile code that makes it to the `develop` branch, should always point to a tagged version of status-go in the `develop` branch of status-go.
In practice, this means that sometimes they need to be merged in lockstep.
1) Create a PR in status-go and status-mobile. Update the status-go version to the PR revision `scripts/update-status-go.sh $git_revision`.
2) Get both PRs reviewed and approved. Once status-mobile PR has been approved, go through manual QA testing if necessary. Don't merge status-mobile PR just yet.
3) Now that you know the integration between client & server is working, bump the `VERSION` in status-go and merge it.
In practice this means:
1) Create a PR in status-go, get it reviewed by status-go devs
2) Create a PR in status-mobile, get it reviewed by devs, then go through manual testing (if necessary)
3) Once ready to merge, merge status-go PR first, make sure you bump the `VERSION` file in status-go
4) Once merged, tag the version with the new version and push the tag:
```
git checkout develop
@@ -39,7 +41,4 @@ In practice, this means that sometimes they need to be merged in lockstep.
git push origin vx.y.z
```
5) Update status-mobile with the new status-go version, using the new tag `scripts/update-status-go.sh "vx.y.z"`
6) In status-mobile, push, rebase against `develop` and merge it 🚀
important note : make sure your status-go PRs get a tested-ok by QA before merging them in.
6) Push, make sure it's rebased and go through the merge process as above.
+1 -1
View File
@@ -52,7 +52,7 @@
<key>ITSAppUsesNonExemptEncryption</key>
<true/>
<key>ITSEncryptionExportComplianceCode</key>
<string>37d5ac79-0eb2-4e66-9117-8a8515185a7f</string>
<string>1aa92c4d-6194-4d7d-b70a-16b48256b87e</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
+1 -1
View File
@@ -48,7 +48,7 @@
<key>ITSAppUsesNonExemptEncryption</key>
<true/>
<key>ITSEncryptionExportComplianceCode</key>
<string>37d5ac79-0eb2-4e66-9117-8a8515185a7f</string>
<string>1aa92c4d-6194-4d7d-b70a-16b48256b87e</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
@@ -1139,11 +1139,6 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
executeRunnableStatusGoMethod(() -> Statusgo.generateAlias(seed), callback);
}
@ReactMethod
public void emojiHash(final String publicKey, final Callback callback) throws JSONException {
executeRunnableStatusGoMethod(() -> Statusgo.emojiHash(publicKey), callback);
}
@ReactMethod(isBlockingSynchronousMethod = true)
public String identicon(final String seed) {
return Statusgo.identicon(seed);
@@ -865,12 +865,6 @@ RCT_EXPORT_METHOD(generateAliasAsync:(NSString *)publicKey
callback(@[result]);
}
RCT_EXPORT_METHOD(emojiHash:(NSString *)publicKey
callback:(RCTResponseSenderBlock)callback) {
NSString *result = StatusgoEmojiHash(publicKey);
callback(@[result]);
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(identicon:(NSString *)publicKey) {
return StatusgoIdenticon(publicKey);
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 KiB

@@ -1,54 +0,0 @@
(ns quo2.components.onboarding.small-option-card.component-spec
(:require [quo2.components.onboarding.small-option-card.view :as small-option-card]
[status-im.react-native.resources :as resources]
[test-helpers.component :as h]))
(defn- testing-small-option-card
[variant
{:keys [title subtitle image on-press]
:or {title "title" subtitle "subtitle"}}]
[small-option-card/small-option-card
{:variant variant
:title title
:subtitle subtitle
:image image
:on-press on-press}])
(h/describe "small-option-card"
(h/describe "Title & subtitle are rendered"
(let [title "A title"
subtitle "A subtitle"
component-props {:title title :subtitle subtitle}]
(h/test "`:main` variant"
(h/render (testing-small-option-card :main component-props))
(-> (h/get-by-text title) h/expect .toBeTruthy)
(-> (h/get-by-text subtitle) h/expect .toBeTruthy))
(h/test "`:icon` variant"
(h/render (testing-small-option-card :icon component-props))
(-> (h/get-by-text title) h/expect .toBeTruthy)
(-> (h/get-by-text subtitle) h/expect .toBeTruthy))))
(h/describe "Card pressed"
(let [on-press-fn (h/mock-fn)
component-props {:on-press on-press-fn}]
(h/test "`:main` variant"
(h/render (testing-small-option-card :main component-props))
(h/fire-event :press (h/get-by-label-text :small-option-card))
(-> on-press-fn js/expect .toHaveBeenCalled))
(h/test "`:icon` variant"
(h/render (testing-small-option-card :icon component-props))
(h/fire-event :press (h/get-by-label-text :small-option-card))
(-> on-press-fn js/expect .toHaveBeenCalled))))
(h/describe "Image rendered"
(let [image (resources/get-mock-image :small-opt-card-main)
component-props {:image image}]
(h/test "`:main` variant"
(h/render (testing-small-option-card :main component-props))
(-> (h/get-by-label-text :small-option-card-main-image) h/expect .-not .toBeNull))
(h/test "`:icon` variant"
(h/render (testing-small-option-card :icon component-props))
(-> (h/get-by-label-text :small-option-card-icon-image) h/expect .-not .toBeNull)))))
@@ -1,52 +0,0 @@
(ns quo2.components.onboarding.small-option-card.style
(:require [quo2.foundations.colors :as colors]))
(def text-container {:flex 1})
(def title
{:color colors/white
:height 22})
(def subtitle
{:color colors/white-opa-70
:height 18})
(def icon-variant
{:flex-direction :row
:padding-vertical 8
:padding-horizontal 12})
(def icon-variant-image-container
{:width 32
:height 40
:justify-content :center
:align-items :center
:padding-vertical 4
:margin-right 8})
(def icon-variant-image
{:flex 1
:width 32
:height 32})
(def main-variant
{:flex 1
:margin-bottom -8})
(def main-variant-text-container
{:height 62
:padding-top 10
:padding-bottom 12
:padding-horizontal 12})
(def touchable-overlay {:border-radius 16})
(defn card-container
[main-variant?]
(when main-variant? {:height 343}))
(defn card
[main-variant?]
{:background-color colors/white-opa-5
:border-radius 16
:height (if main-variant? 335 56)})
@@ -1,66 +0,0 @@
(ns quo2.components.onboarding.small-option-card.view
(:require [quo2.components.markdown.text :as text]
[quo2.components.onboarding.small-option-card.style :as style]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[react-native.fast-image :as fast-image]))
(defn- texts
[{:keys [title subtitle]}]
[rn/view {:style style/text-container}
[text/text
{:style style/title
:size :paragraph-1
:weight :semi-bold
:number-of-lines 1}
title]
[text/text
{:style style/subtitle
:size :paragraph-2
:weight :regular
:number-of-lines 1}
subtitle]])
(defn- icon-variant
[{:keys [title subtitle image]}]
[rn/view {:style style/icon-variant}
[rn/view {:style style/icon-variant-image-container}
[fast-image/fast-image
{:accessibility-label :small-option-card-icon-image
:style style/icon-variant-image
:resize-mode :contain
:source image}]]
[texts
{:title title
:subtitle subtitle}]])
(defn- main-variant
[{:keys [title subtitle image]}]
[rn/view {:style style/main-variant}
[rn/view {:style style/main-variant-text-container}
[texts
{:title title
:subtitle subtitle}]]
[fast-image/fast-image
{:accessibility-label :small-option-card-main-image
:style {:flex 1}
:resize-mode :contain
:source image}]])
(defn small-option-card
[{:keys [variant title subtitle image on-press]
:or {variant :main}}]
(let [main-variant? (= variant :main)
card-component (if main-variant? main-variant icon-variant)]
[rn/touchable-highlight
{:accessibility-label :small-option-card
:style style/touchable-overlay
:active-opacity 1
:underlay-color colors/white-opa-5
:on-press on-press}
[rn/view {:style (style/card-container main-variant?)}
[rn/view {:style (style/card main-variant?)}
[card-component
{:title title
:subtitle subtitle
:image image}]]]]))
-4
View File
@@ -50,7 +50,6 @@
quo2.components.separator
quo2.components.settings.accounts.view
quo2.components.settings.privacy-option
quo2.components.onboarding.small-option-card.view
quo2.components.tabs.account-selector
quo2.components.tabs.tabs
quo2.components.tags.context-tags
@@ -102,9 +101,6 @@
;;;; BANNER
(def banner quo2.components.banners.banner.view/banner)
;;;; CARDS
(def small-option-card quo2.components.onboarding.small-option-card.view/small-option-card)
;;;; COMMUNITY
(def community-card-view-item quo2.components.community.community-card-view/community-card-view-item)
(def communities-list-view-item quo2.components.community.community-list-view/communities-list-view-item)
+3 -4
View File
@@ -6,8 +6,7 @@
[quo2.components.drawers.action-drawers.component-spec]
[quo2.components.drawers.permission-context.component-spec]
[quo2.components.markdown.--tests--.text-component-spec]
[quo2.components.onboarding.small-option-card.component-spec]
[quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec]
[quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec]
[quo2.components.selectors.--tests--.selectors-component-spec]
[quo2.components.selectors.filter.component-spec]))
[quo2.components.selectors.filter.component-spec]
[quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec]
[quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec]))
+5 -6
View File
@@ -14,8 +14,7 @@
[status-im2.contexts.activity-center.events :as activity-center]
[status-im2.common.toasts.events :as toasts]
[status-im2.navigation.events :as navigation]
[taoensso.timbre :as log]
[status-im.communities.mock :as mock]))
[taoensso.timbre :as log]))
(def crop-size 1000)
@@ -101,10 +100,10 @@
(rf/defn handle-communities
{:events [::fetched]}
[{:keys [db]} communities]
{:db (mock/add-mock-data (reduce (fn [db {:keys [id] :as community}]
(assoc-in db [:communities id] (<-rpc community)))
db
communities))})
{:db (reduce (fn [db {:keys [id] :as community}]
(assoc-in db [:communities id] (<-rpc community)))
db
communities)})
(rf/defn handle-response
[_ response-js]
-42
View File
@@ -1,42 +0,0 @@
(ns status-im.communities.mock
(:require [status-im2.constants :as constants]))
(def status-channel-to-mock "5c328f54-4d40-4984-ae96-b946247d8dba")
(def community-gates
{:join [[{:token "KNC"
:amount 200}
{:token "MANA"
:amount 10}
{:token "RARE"
:amount 50}]
[{:token "KNC"
:amount 200}
{:token "MANA"
:amount 50}]]})
(def channel-gates
{:read [[{:token "KNC"
:amount 100}
{:token "RARE"
:amount 50}]
[{:token "KNC"
:amount 200}
{:token "MANA"
:amount 50}]]
:write [[{:token "KNC"
:amount 400}]
[{:token "KNC"
:amount 100}
{:token "RARE"
:amount 50}]]})
(defn add-mock-data
[db]
(if (get-in db [:communities constants/status-community-id])
(-> db
(assoc-in [:communities constants/status-community-id :gates] community-gates)
(assoc-in [:communities constants/status-community-id :status] :gated)
(assoc-in [:communities constants/status-community-id :chats status-channel-to-mock :gates]
channel-gates))
db))
+2 -2
View File
@@ -43,8 +43,8 @@
(defn sort-contacts
[contacts]
(sort (fn [c1 c2]
(let [name1 (first (:two-names c1))
name2 (first (:two-names c2))]
(let [name1 (or (:name c1) (:address c1) (:public-key c1))
name2 (or (:name c2) (:address c2) (:public-key c2))]
(compare (string/lower-case name1)
(string/lower-case name2))))
(vals contacts)))
+12 -9
View File
@@ -40,8 +40,11 @@
:three-words-name (or alias (gfycat/generate-gfy public-key))}
;; Preferred name is our own otherwise we make sure it's verified
(or preferred-name (and ens-verified name))
(assoc :ens-name (or (stateofus/username ens-name) ens-name)))))
(assoc :ens-name (str "@" (or (stateofus/username ens-name) ens-name))))))
;; NOTE: this does a bit of unnecessary work, we could short-circuit the work
;; once the first two are found, i.e don't calculate short key if 2 are already
;; available
(defn contact-two-names
"Returns vector of two names in next order nickname, ens name, display-name, three word name, public key"
[{:keys [names
@@ -53,17 +56,17 @@
display-name
three-words-name]}
(or names (contact-names contact))
non-empty-names (remove string/blank? [nickname ens-name display-name three-words-name])]
(if (> (count non-empty-names) 1)
(vec (take 2 non-empty-names))
[(first non-empty-names)
(when public-key? (utils/get-shortened-address (or compressed-key public-key)))])))
short-public-key (when public-key?
(utils/get-shortened-address (or compressed-key
public-key)))]
(->> [nickname ens-name display-name three-words-name short-public-key]
(remove string/blank?)
(take 2))))
(defn contact-with-names
"Returns contact with :names map "
[contact]
(let [contact' (assoc contact :names (contact-names contact))]
(assoc contact' :two-names (contact-two-names contact' true))))
(assoc contact :names (contact-names contact)))
(defn displayed-name
"Use preferred name, name or alias in that order"
@@ -73,7 +76,7 @@
;; Preferred name is our own otherwise we make sure it's verified
(if (or preferred-name (and ens-verified name))
(let [username (stateofus/username ens-name)]
(or username ens-name))
(str "@" (or username ens-name)))
(or alias (gfycat/generate-gfy public-key)))))
(defn contact-by-identity
+2 -2
View File
@@ -29,11 +29,11 @@
(testing "names is nil"
(testing "nickname has precedence"
(is
(= [nickname ens-name]
(= [nickname formatted-ens]
(ma/contact-two-names contact public-key))))
(testing "ens name is second option"
(is
(= [ens-name display-name]
(= [formatted-ens display-name]
(ma/contact-two-names
(dissoc contact :nickname)
public-key))))
+2 -5
View File
@@ -44,8 +44,7 @@
[status-im2.navigation.events :as navigation]
[status-im2.common.log :as logging]
[taoensso.timbre :as log]
[utils.security.core :as security]
[status-im2.contexts.emoji-hash.events :as emoji-hash]))
[utils.security.core :as security]))
(re-frame/reg-fx
::initialize-communities-enabled
@@ -412,8 +411,7 @@
(communities/fetch)
(logging/set-log-level (:log-level multiaccount))
(activity-center/notifications-fetch-unread-contact-requests)
(activity-center/notifications-fetch-unread-count)
#_(communities/resolve-mock-community-info))))
(activity-center/notifications-fetch-unread-count))))
(re-frame/reg-fx
::open-last-chat
@@ -475,7 +473,6 @@
(get-group-chat-invitations)
(multiaccounts/get-profile-picture)
(multiaccounts/switch-preview-privacy-mode-flag)
(emoji-hash/fetch-for-current-public-key)
(link-preview/request-link-preview-whitelist)
(visibility-status-updates-store/fetch-visibility-status-updates-rpc)
(switcher-cards-store/fetch-switcher-cards-rpc))))
-6
View File
@@ -481,12 +481,6 @@
(when (validators/valid-public-key? public-key)
(.generateAliasAsync ^js (status) public-key callback)))
(defn public-key->emoji-hash
"Generate an emoji hash from the multiaccount public key"
[public-key callback]
(when (validators/valid-public-key? public-key)
(.emojiHash ^js (status) public-key callback)))
(defn identicon
"Generate a icon based on a string, synchronously"
[seed]
+1 -3
View File
@@ -67,9 +67,7 @@
:user-picture-female2 (js/require "../resources/images/mock/user_picture_female2.png")
:user-picture-male4 (js/require "../resources/images/mock/user_picture_male4.png")
:user-picture-male5 (js/require "../resources/images/mock/user_picture_male5.png")
:coinbase (js/require "../resources/images/mock/coinbase.png")
:small-opt-card-icon (js/require "../resources/images/mock/small_opt_card_icon.png")
:small-opt-card-main (js/require "../resources/images/mock/small_opt_card_main.png")})
:coinbase (js/require "../resources/images/mock/coinbase.png")})
(defn get-theme-image
[k]
+4 -18
View File
@@ -8,8 +8,6 @@
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip681 :as eip681]
[status-im.ethereum.ens :as ens]
[status-im.utils.types :as types]
[status-im.native-module.core :as status]
[status-im.ethereum.stateofus :as stateofus]
[status-im2.utils.validators :as validators]
[status-im.utils.http :as http]
@@ -73,27 +71,15 @@
(defn match-contact-async
[chain {:keys [user-id ens-name]} callback]
(let [valid-public-key? (and (validators/valid-public-key? user-id)
(not= user-id ens/default-key))
valid-compressed-key? (validators/valid-compressed-key? user-id)]
(let [valid-key (and (validators/valid-public-key? user-id)
(not= user-id ens/default-key))]
(cond
valid-public-key?
valid-key
(callback {:type :contact
:public-key user-id
:ens-name ens-name})
valid-compressed-key?
(status/compressed-key->public-key
user-id
(fn [response]
(let [{:keys [error]} (types/json->clj response)]
(when-not error
(match-contact-async
chain
{:user-id (str "0x" (subs response 5)) :ens-name ens-name}
callback)))))
(and (not valid-public-key?)
(and (not valid-key)
(string? user-id)
(not (string/blank? user-id))
(not= user-id "0x"))
@@ -16,7 +16,6 @@
:justify-content :center
:align-items :center})
(def chat-button
{:position :absolute
:bottom 30
:align-self :center})
(defn chat-button
[{:keys [bottom]}]
{:bottom (- bottom 50)})
@@ -6,12 +6,14 @@
[reagent.core :as reagent]
[status-im2.constants :as constants]
[utils.i18n :as i18n]
[react-native.core :as rn]
[status-im.ui.components.react :as react]
[utils.re-frame :as rf]
[status-im.ui.components.toolbar :as toolbar]
[status-im2.common.contact-list.view :as contact-list]
[quo2.components.markdown.text :as text]
[status-im.ui.components.invite.events :as invite.events]
[status-im.ui2.screens.chat.components.new-chat.styles :as style]
[quo.components.safe-area :as safe-area]
[status-im.react-native.resources :as resources]))
(defn- hide-sheet-and-dispatch
@@ -31,11 +33,11 @@
(defn- no-contacts-view
[]
[rn/view
[react/view
{:style {:justify-content :center
:align-items :center
:margin-top 120}}
[rn/image
[react/image
{:source (resources/get-image (if (quo2.colors/dark?) :no-contacts-dark :no-contacts))}]
[text/text
{:weight :semi-bold
@@ -72,8 +74,9 @@
added? (reagent/atom '())
{:keys [nickname ens-name three-words-name]} names
first-username (or ens-name nickname three-words-name)
no-contacts? (empty? contacts)]
[rn/view {:style {:height (* window-height 0.9)}}
no-contacts? (empty? contacts)
safe-area (safe-area/use-safe-area)]
[react/view {:style {:height (* window-height 0.9)}}
[quo2/button
{:type :grey
:icon true
@@ -82,7 +85,7 @@
:override-background-color (quo2.colors/theme-colors quo2.colors/neutral-10
quo2.colors/neutral-90)}
:i/close]
[rn/view style/contact-selection-heading
[react/view style/contact-selection-heading
[quo2/text
{:weight :semi-bold
:size :heading-1
@@ -96,8 +99,9 @@
(i18n/label :t/selected-count-from-max
{:selected (inc selected-contacts-count)
:max constants/max-group-chat-participants})])]
[rn/view
{:style {:flex 1}}
[react/view
{:style {:height 430
:margin-bottom -20}}
(if no-contacts?
[no-contacts-view]
[contact-list/contact-list
@@ -106,19 +110,21 @@
:added? added?
:search? false
:start-a-new-chat? true
:on-toggle on-toggle}
70])]
:on-toggle on-toggle}])]
(when contacts-selected?
[button/button
{:type :primary
:style style/chat-button
:accessibility-label :next-button
:on-press (fn []
(if one-contact-selected?
(hide-sheet-and-dispatch [:chat.ui/start-chat
public-key])
(hide-sheet-and-dispatch [:navigate-to
:new-group])))}
(if one-contact-selected?
(i18n/label :t/chat-with {:selected-user first-username})
(i18n/label :t/setup-group-chat))])]))])
[toolbar/toolbar
{:size :default
:show-border? false
:center [button/button
{:type :primary
:accessibility-label :next-button
:style (style/chat-button safe-area)
:on-press (fn []
(if one-contact-selected?
(hide-sheet-and-dispatch [:chat.ui/start-chat
public-key])
(hide-sheet-and-dispatch [:navigate-to
:new-group])))}
(if one-contact-selected?
(i18n/label :t/chat-with {:selected-user first-username})
(i18n/label :t/setup-group-chat))]}])]))])
@@ -40,7 +40,7 @@
(rf/sub [:contacts/contact-name-by-identity from]))
(defn render-inline
[_message-text content-type acc {:keys [type literal destination]}]
[_message-text content-type acc {:keys [type literal destination]} use-status-tag?]
(case type
""
(conj acc literal)
@@ -82,9 +82,10 @@
"status-tag"
(conj acc
[rn/text
{:style {:color :blue
:text-decoration-line :underline}
:on-press #(rf/dispatch [:chat.ui/start-public-chat literal])}
(when use-status-tag?
{:style {:color :blue
:text-decoration-line :underline}
:on-press #(rf/dispatch [:chat.ui/start-public-chat literal])})
"#"
literal])
@@ -96,13 +97,15 @@
;; TEXT
(defn render-block
[{:keys [content content-type edited-at in-popover?]} acc
{:keys [type ^js literal children]}]
{:keys [type ^js literal children]}
use-status-tag?]
(case type
"paragraph"
(conj acc
(reduce
(fn [acc e] (render-inline (:text content) content-type acc e))
(fn [acc e] (render-inline (:text content) content-type acc e use-status-tag?))
[rn/text (style/text-style content-type in-popover?)]
(conj
children
@@ -123,11 +126,13 @@
acc))
(defn render-parsed-text
[{:keys [content] :as message-data}]
(reduce (fn [acc e]
(render-block message-data acc e))
[:<>]
(:parsed-text content)))
[{:keys [content chat-id] :as message-data}]
(let [{:keys [chat-type]} (rf/sub [:chats/chat chat-id])
use-status-tag? (= constants/community-chat-type chat-type)]
(reduce (fn [acc e]
(render-block message-data acc e use-status-tag?))
[:<>]
(:parsed-text content))))
(defn quoted-message
[{:keys [message-id chat-id]} reply pin?]
@@ -288,7 +293,7 @@
[rn/view style/status-container
[rn/text {:style (style/status-text)}
(reduce
(fn [acc e] (render-inline (:text content) content-type acc e))
(fn [acc e] (render-inline (:text content) content-type acc e false))
[rn/text {:style (style/status-text)}]
(-> content :parsed-text peek :children))]])
@@ -113,7 +113,11 @@
:pop-to-root-tab-fx :profile-stack}
public-key
{:dispatch [:chat.ui/show-profile public-key ens-name]}))
(navigation/navigate-to-cofx (-> cofx
(assoc-in [:db :contacts/identity] public-key)
(assoc-in [:db :contacts/ens-name] ens-name))
:profile
{})))
(rf/defn handle-eip681
[cofx data]
+2 -2
View File
@@ -9,7 +9,7 @@
[quo/divider-label {:label title}])
(defn contact-list
[data padding-bottom]
[data]
(let [contacts (if (:group data)
(rf/sub [:contacts/grouped-by-first-letter])
(rf/sub [:contacts/filtered-active-sections]))]
@@ -18,6 +18,6 @@
:sticky-section-headers-enabled false
:sections contacts
:render-section-header-fn contacts-section-header
:content-container-style {:padding-bottom (or padding-bottom 20)}
:content-container-style {:padding-bottom 20}
:render-data data
:render-fn contact-list-item/contact-list-item}]))
+2 -2
View File
@@ -74,7 +74,7 @@
:style {:line-height 21}}
name]])
(if top-nav
top-nav
[top-nav]
[quo/page-nav
(merge {:horizontal-description? true
:one-icon-align-left? true
@@ -89,7 +89,7 @@
:icon-background-color (icon-color)
:on-press #(rf/dispatch [:navigate-back])}}))])
(when title-colum
title-colum)
[title-colum])
sticky-header]]))
@@ -36,11 +36,13 @@
parsed-text-children))))
(defn view
[{:keys [author chat-name community-id chat-id message read timestamp]}]
(let [community-chat? (not (string/blank? community-id))
community (rf/sub [:communities/community community-id])
community-name (:name community)
community-image (get-in community [:images :thumbnail :uri])]
[{:keys [author chat-name chat-id message read timestamp]}]
(let [chat (rf/sub [:chats/chat chat-id])
community-id (:community-id chat)
is-chat-from-community? (not (nil? community-id))
community (rf/sub [:communities/community community-id])
community-name (:name community)
community-image (get-in community [:images :thumbnail :uri])]
[rn/touchable-opacity
{:on-press (fn []
(rf/dispatch [:hide-popover])
@@ -52,7 +54,7 @@
:unread? (not read)
:context [[common/user-avatar-tag author]
[quo/text {:style style/tag-text} (string/lower-case (i18n/label :t/on))]
(if community-chat?
(if is-chat-from-community?
[quo/context-tag tag-params {:uri community-image} community-name chat-name]
[quo/group-avatar-tag chat-name tag-params])]
:message {:body (message-body message)}}]]))
@@ -1,6 +1,5 @@
(ns status-im2.contexts.activity-center.notification.reply.view
(:require [clojure.string :as string]
[quo2.core :as quo]
(:require [quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[status-im.ui2.screens.chat.messages.message :as old-message]
@@ -38,11 +37,13 @@
nil))
(defn view
[{:keys [author chat-name community-id chat-id message read timestamp]}]
(let [community-chat? (not (string/blank? community-id))
community (rf/sub [:communities/community community-id])
community-name (:name community)
community-image (get-in community [:images :thumbnail :uri])]
[{:keys [author chat-name chat-id message read timestamp]}]
(let [chat (rf/sub [:chats/chat chat-id])
community-id (:community-id chat)
is-chat-from-community? (not (nil? community-id))
community (rf/sub [:communities/community community-id])
community-name (:name community)
community-image (get-in community [:images :thumbnail :uri])]
[rn/touchable-opacity
{:on-press (fn []
(rf/dispatch [:hide-popover])
@@ -54,7 +55,7 @@
:unread? (not read)
:context [[common/user-avatar-tag author]
[quo/text {:style style/lowercase-text} (i18n/label :t/on)]
(if community-chat?
(if is-chat-from-community?
[quo/context-tag tag-params {:uri community-image} community-name chat-name]
[quo/group-avatar-tag chat-name tag-params])]
:message {:body-number-of-lines 1
@@ -6,7 +6,6 @@
[status-im.ethereum.ens :as ens]
[status-im.ethereum.stateofus :as stateofus]
[status-im.native-module.core :as status]
[status-im2.navigation.events :as navigation]
[status-im2.utils.validators :as validators]
[status-im.utils.utils :as utils]))
@@ -110,10 +109,3 @@
{:events [:contacts/clear-new-identity :contacts/new-chat-focus]}
[{:keys [db]}]
{:db (dissoc db :contacts/new-identity)})
(rf/defn qr-code-scanned
{:events [:contacts/qr-code-scanned]}
[{:keys [db] :as cofx} input]
(rf/merge cofx
(set-new-identity input)
(navigation/navigate-back)))
@@ -2,7 +2,6 @@
(:require [quo2.core :as quo]
[react-native.core :as rn]
[status-im.react-native.resources :as resources]
[status-im.qr-scanner.core :as qr-scanner]
[status-im2.contexts.add-new-contact.style :as style]
[utils.debounce :as debounce]
[utils.i18n :as i18n]
@@ -43,8 +42,7 @@
600)})]
[quo/button
(merge style/button-qr
{:on-press #(rf/dispatch [::qr-scanner/scan-code
{:handler :contacts/qr-code-scanned}])})
{:on-press #(js/alert "TODO: to be implemented")})
:i/scan]]
(when error?
[rn/view style/container-error
@@ -2,10 +2,10 @@
(:require [quo2.foundations.colors :as colors]))
(defn message-container
[in-pinned-view? pinned-by mentioned last-in-group?]
(merge (when (and (not in-pinned-view?) (or mentioned pinned-by))
[in-pinned-view? pinned mentioned last-in-group?]
(merge (when (and (not in-pinned-view?) (or mentioned pinned))
{:background-color colors/primary-50-opa-5
:margin-bottom 4})
(when (or mentioned pinned-by last-in-group?)
(when (or mentioned pinned last-in-group?)
{:margin-top 8})
{:border-radius 16}))
@@ -156,14 +156,14 @@
[status/status outgoing-status])]]]])))])
(defn message-with-reactions
[{:keys [pinned-by mentioned in-pinned-view? content-type
[{:keys [pinned pinned-by mentioned in-pinned-view? content-type
last-in-group? message-id messages-ids]
:as message-data}
{:keys [chat-id] :as context}]
[rn/view
{:style (style/message-container in-pinned-view? pinned-by mentioned last-in-group?)
{:style (style/message-container in-pinned-view? pinned mentioned last-in-group?)
:accessibility-label :chat-item}
(when pinned-by
(when pinned
[pin/pinned-by-view pinned-by])
(if (#{constants/content-type-system-text constants/content-type-community
constants/content-type-contact-request}
@@ -10,18 +10,16 @@
[status-im2.common.not-implemented :as not-implemented]))
(defn pin-message
[{:keys [chat-id pinned pinned-by] :as message-data}]
(let [pinned-messages (rf/sub [:chats/pinned chat-id])
message-not-pinned? (and (empty? pinned-by) (not pinned))]
(if (and message-not-pinned? (> (count pinned-messages) 2))
[{:keys [chat-id pinned] :as message-data}]
(let [pinned-messages (rf/sub [:chats/pinned chat-id])]
(if (and (not pinned) (> (count pinned-messages) 2))
(do
(js/setTimeout (fn [] (rf/dispatch [:dismiss-keyboard])) 500)
(rf/dispatch [:pin-message/show-pin-limit-modal chat-id]))
(rf/dispatch [:pin-message/send-pin-message
(assoc message-data :pinned message-not-pinned?)]))))
(rf/dispatch [:pin-message/send-pin-message (assoc message-data :pinned (not pinned))]))))
(defn get-actions
[{:keys [outgoing content pinned-by outgoing-status] :as message-data}
[{:keys [outgoing content pinned outgoing-status] :as message-data}
{:keys [edit-enabled show-input? can-delete-message-for-everyone? community? message-pin-enabled]}]
(concat
(when (and outgoing edit-enabled)
@@ -46,12 +44,12 @@
(when message-pin-enabled
[{:type :main
:on-press #(pin-message message-data)
:label (i18n/label (if pinned-by
:label (i18n/label (if pinned
(if community? :t/unpin-from-channel :t/unpin-from-chat)
(if community? :t/pin-to-channel :t/pin-to-chat)))
:icon :i/pin
:id (if pinned-by :unpin :pin)}])
(when-not pinned-by
:id (if pinned :unpin :pin)}])
(when-not pinned
[{:type :danger
:on-press (fn []
(rf/dispatch
@@ -77,30 +77,18 @@
(defn home-page-comunity-lists
[{:keys [selected-tab padding-top]}]
[rn/view {:style {:flex 1}}
[communities-header selected-tab padding-top]
[render-communities-segments selected-tab]])
(fn []
[rn/view {:style {:flex 1}}
[communities-header selected-tab padding-top]
[render-communities-segments selected-tab]]))
(defn home-sticky-header
[{:keys [selected-tab scroll-height padding-top]}]
(when (> @scroll-height 80)
[rn/view
{:style style/blur-tabs-header}
[community-segments selected-tab padding-top]]))
(defn home-nav
[]
[common.home/top-nav
{:type :default
:hide-search true
:style {:background-color :transparent}}])
(defn title-column
[]
[common.home/title-column
{:label (i18n/label :t/communities)
:handler #(rf/dispatch [:bottom-sheet/show-sheet :add-new {}])
:accessibility-label :new-chat-button}])
(fn []
(when (> @scroll-height 80)
[rn/view
{:style style/blur-tabs-header}
[community-segments selected-tab padding-top]])))
(defn communities-screen-content
[]
@@ -110,8 +98,16 @@
[scroll-page/scroll-page
{:name (i18n/label :t/communities)
:on-scroll #(reset! scroll-height %)
:top-nav [home-nav]
:title-colum [title-column]
:top-nav (fn []
[common.home/top-nav
{:type :default
:hide-search true
:style {:background-color :transparent}}])
:title-colum (fn []
[common.home/title-column
{:label (i18n/label :t/communities)
:handler #(rf/dispatch [:bottom-sheet/show-sheet :add-new {}])
:accessibility-label :new-chat-button}])
:background-color (colors/theme-colors
colors/white
colors/neutral-95)
@@ -31,7 +31,7 @@
(utils/join-existing-users-string user-list)]])
(defn channel-token-gating-details
[name gates emoji channel-color]
[name token-gating emoji channel-color]
[rn/view {:height 350 :margin-top 20}
[quo/token-gating
{:channel {:name name
@@ -42,15 +42,15 @@
(js/alert
"Entered channel"
"Wuhuu!! You successfully entered the channel :)"))
:gates gates}}]])
:gates token-gating}}]])
(defn open-channel-token-gating-details
[name gates emoji channel-color]
[name token-gating emoji channel-color]
(rf/dispatch
[:bottom-sheet/show-sheet
{:content
(fn []
[channel-token-gating-details name gates emoji channel-color])
[channel-token-gating-details name token-gating emoji channel-color])
:content-height 210}]))
(defn layout-y
@@ -160,13 +160,13 @@
:gates tokens}}]])
(defn add-on-press-handler
[community-id {:keys [name emoji id locked? gates] :or {locked? false} :as chat}]
[community-id {:keys [name emoji id locked? token-gating] :or {locked? false} :as chat}]
(merge
chat
(if (and locked? gates)
(if (and locked? token-gating)
{:on-press #(open-channel-token-gating-details
name
gates
token-gating
emoji
(colors/custom-color :pink 50))}
@@ -210,16 +210,14 @@
(defn community-content
[{:keys [name description locked joined images
status tags requested-to-join-at id]
status tokens tags requested-to-join-at id]
:as community}
{:keys [on-categories-heights-changed
on-first-channel-height-changed]}]
(let [pending? (pos? requested-to-join-at)
thumbnail-image (get-in images [:thumbnail])
chats-by-category (rf/sub [:communities/categorized-channels id])
users (rf/sub [:communities/users id])
join-gates (rf/sub [:community/join-gates id])
permission-tag-tokens (rf/sub [:community/permission-tag-tokens id])]
(let [pending? (pos? requested-to-join-at)
thumbnail-image (get-in images [:thumbnail])
chats-by-category (rf/sub [:communities/categorized-channels id])
users (rf/sub [:communities/users id])]
[rn/view
[rn/view {:padding-horizontal 20}
(when (and (not joined)
@@ -232,7 +230,7 @@
[quo/permission-tag-container
{:locked locked
:status status
:tokens permission-tag-tokens
:tokens tokens
:on-press #(rf/dispatch
[:bottom-sheet/show-sheet
{:content-height 210
@@ -241,7 +239,7 @@
[community-token-gating-details
name
thumbnail-image
join-gates])}])}]])
tokens])}])}]])
(when (or pending? joined)
[rn/view
{:position :absolute
@@ -1,19 +0,0 @@
(ns status-im2.contexts.emoji-hash.events
(:require [utils.re-frame :as rf]
[status-im.native-module.core :as native-module]
[utils.transforms :as transform]))
(defn fetch-for-current-public-key
[]
(let [public-key (rf/sub [:multiaccount/public-key])]
(native-module/public-key->emoji-hash
public-key
(fn [response]
(let [response-clj (transform/json->clj response)
emoji-hash (get response-clj :result)]
(rf/dispatch [:emoji-hash/add-to-multiaccount emoji-hash]))))))
(rf/defn add-emoji-hash-to-multiaccount
{:events [:emoji-hash/add-to-multiaccount]}
[{:keys [db]} emoji-hash]
{:db (assoc db :multiaccount/emoji-hash emoji-hash)})
@@ -8,7 +8,6 @@
[re-frame.core :as re-frame]
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[status-im2.contexts.quo-preview.animated-header-list.animated-header-list :as animated-header-list]
[status-im2.contexts.quo-preview.avatars.account-avatar :as account-avatar]
[status-im2.contexts.quo-preview.avatars.channel-avatar :as channel-avatar]
[status-im2.contexts.quo-preview.avatars.group-avatar :as group-avatar]
@@ -47,7 +46,6 @@
[status-im2.contexts.quo-preview.navigation.top-nav :as top-nav]
[status-im2.contexts.quo-preview.notifications.activity-logs :as activity-logs]
[status-im2.contexts.quo-preview.notifications.toast :as toast]
[status-im2.contexts.quo-preview.onboarding.small-option-card :as small-option-card]
[status-im2.contexts.quo-preview.posts-and-attachments.messages-skeleton :as messages-skeleton]
[status-im2.contexts.quo-preview.profile.collectible :as collectible]
[status-im2.contexts.quo-preview.profile.profile-card :as profile-card]
@@ -70,7 +68,8 @@
[status-im2.contexts.quo-preview.wallet.lowest-price :as lowest-price]
[status-im2.contexts.quo-preview.wallet.network-amount :as network-amount]
[status-im2.contexts.quo-preview.wallet.network-breakdown :as network-breakdown]
[status-im2.contexts.quo-preview.wallet.token-overview :as token-overview]))
[status-im2.contexts.quo-preview.wallet.token-overview :as token-overview]
[status-im2.contexts.quo-preview.animated-header-list.animated-header-list :as animated-header-list]))
(def screens-categories
{:foundations [{:name :shadows
@@ -187,9 +186,6 @@
{:name :toast
:insets {:top false}
:component toast/preview-toasts}]
:onboarding [{:name :small-option-card
:insets {:top false}
:component small-option-card/preview-small-option-card}]
:posts-and-attachments [{:name :messages-skeleton
:insets {:top false}
:component messages-skeleton/preview-messages-skeleton}]
@@ -1,58 +0,0 @@
(ns status-im2.contexts.quo-preview.onboarding.small-option-card
(:require
[quo.react-native :as rn]
[quo2.components.onboarding.small-option-card.view :as quo2]
[quo2.foundations.colors :as colors]
[reagent.core :as reagent]
[status-im.react-native.resources :as resources]
[status-im2.contexts.quo-preview.preview :as preview]))
(def descriptor
[{:label "Variant"
:key :variant
:type :select
:options [{:key :main
:value "Main"}
{:key :icon
:value "Icon"}]}
{:label "Image"
:key :image
:type :select
:options [{:key (resources/get-mock-image :small-opt-card-main)
:value "Image 1"}
{:key (resources/get-mock-image :small-opt-card-icon)
:value "Image 2"}]}
{:label "Title"
:key :title
:type :text}
{:label "Subtitle"
:key :subtitle
:type :text}])
(defn cool-preview
[]
(let [state (reagent/atom {:variant :main
:image (-> descriptor second :options first :key)
:title "Generate keys "
:subtitle "Your new self-sovereign identity in Status"
:on-press #(js/alert "Small option card pressed!")})]
(fn []
[rn/touchable-without-feedback {:on-press rn/dismiss-keyboard!}
[rn/view {:style {:padding-bottom 150}}
[rn/view {:style {:flex 1}}
[preview/customizer state descriptor]]
[rn/view
{:style {:background-color colors/neutral-80
:padding 20}}
[quo2/small-option-card @state]]]])))
(defn preview-small-option-card
[]
[rn/view
{:style {: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}]])
+1 -64
View File
@@ -216,34 +216,6 @@
(sort-by :position)
(into []))))
(def token-images
{"KNC" (js/require "../resources/images/tokens/mainnet/KNC.png")
"MANA" (js/require "../resources/images/tokens/mainnet/MANA.png")
"RARE" (js/require "../resources/images/tokens/mainnet/RARE.png")
"ETH" (js/require "../resources/images/tokens/mainnet/ETH.png")
"DAI" (js/require "../resources/images/tokens/mainnet/DAI.png")})
(defn token-image
[token]
(get token-images token))
(defn enrich-gate-for-ui
[{:keys [token] :as gate}]
(assoc gate :token-img-src (token-image token) :is-sufficient? false))
(defn enrich-gates-vector-for-ui
[gates]
(vec (map enrich-gate-for-ui gates)))
(defn enrich-gates-for-ui
[gates]
(vec (map (fn [v]
(if (vector? v)
(enrich-gates-vector-for-ui v)
(enrich-gate-for-ui v)))
gates)))
(re-frame/reg-sub
:communities/categorized-channels
(fn [[_ community-id]]
@@ -251,7 +223,7 @@
(re-frame/subscribe [:chats/chats])])
(fn [[{:keys [joined categories chats]} full-chats-data] [_ community-id]]
(reduce
(fn [acc [_ {:keys [name categoryID id emoji can-post? gates]}]]
(fn [acc [_ {:keys [name categoryID id emoji can-post?]}]]
(let [category (keyword
(get-in categories
[categoryID :name]
@@ -263,11 +235,6 @@
#(vec (conj %1 %2))
{:name name
:emoji emoji
:gates (merge
(when (contains? gates :read)
{:read (enrich-gates-for-ui (:read gates))})
(when (contains? gates :write)
{:write (enrich-gates-for-ui (:write gates))}))
:unread-messages? (pos? unviewed-messages-count)
:mentions-count (or unviewed-mentions-count 0)
:locked? (or (not joined) (not can-post?))
@@ -283,33 +250,3 @@
{:full-name "Marcus C"}
{:full-name "MNO PQR"}
{:full-name "STU VWX"}]))
(re-frame/reg-sub
:community/join-gates
(fn [[_ community-id]]
[(re-frame/subscribe [:communities/community community-id])])
(fn [[{:keys [gates]}] _]
(when gates
{:join (enrich-gates-for-ui (gates :join))})))
(defn icons-for-permission-tag
[gates]
(vec (map-indexed (fn [i {:keys [token]}]
{:id i :token-icon (token-image token)})
gates)))
(re-frame/reg-sub
:community/permission-tag-tokens
(fn [[_ community-id]]
[(re-frame/subscribe [:communities/community community-id])])
(fn [[{:keys [gates]}] _]
(when gates
(let [join-gates (gates :join)
first-item (first join-gates)]
(if (vector? first-item)
(vec (map-indexed (fn [i v]
{:id i
:group (icons-for-permission-tag v)})
join-gates))
[{:id 0
:group (icons-for-permission-tag join-gates)}])))))
+10 -4
View File
@@ -76,10 +76,16 @@
:contacts/active-sections
:<- [:contacts/active]
(fn [contacts]
(->> contacts
(group-by #(string/upper-case (ffirst (:two-names %))))
sort
(mapv (fn [[title items]] {:title title :data items})))))
(-> (reduce
(fn [acc contact]
(let [first-char (first (:alias contact))]
(if (get acc first-char)
(update-in acc [first-char :data] #(conj % contact))
(assoc acc first-char {:title first-char :data [contact]}))))
{}
contacts)
sort
vals)))
(re-frame/reg-sub
:contacts/grouped-by-first-letter
+3 -6
View File
@@ -95,8 +95,7 @@
:names {:nickname nil
:display-name ""
:three-words-name "Fake Slim Shady"
:ens-name "slim.shady"}
:two-names ["slim.shady" "Fake Slim Shady"]
:ens-name "@slim.shady"}
:has-added-us true
:contact-request-state 1}]}
{:title "I"
@@ -125,8 +124,7 @@
:names {:nickname nil
:display-name ""
:three-words-name "Instant noodles"
:ens-name "slim.shady"}
:two-names ["slim.shady" "Instant noodles"]
:ens-name "@slim.shady"}
:has-added-us true
:contact-request-state 1}]}
{:title "R"
@@ -155,8 +153,7 @@
:names {:nickname nil
:display-name ""
:three-words-name "Real Slim Shady"
:ens-name "slim.shady"}
:two-names ["slim.shady" "Real Slim Shady"]
:ens-name "@slim.shady"}
:has-added-us true
:contact-request-state 1}]}])
-2
View File
@@ -45,5 +45,3 @@
(defn advance-timers-by-time
[time-ms]
(js/jest.advanceTimersByTime time-ms))
(def mock-fn js/jest.fn)
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.131.4",
"commit-sha1": "0b2f0ef28923d2bc3c9051d038e7c512bfdc741f",
"src-sha256": "1pql2dkzwny5yv8ggi2dikfc6dbp64cyxjnm8k0nyl2wfs8ax2cg"
"version": "v0.130.0",
"commit-sha1": "dea21f440a9f630c4b8324fcde0b016d6c3fc02b",
"src-sha256": "1w9iyigj0rkqfnyb8m9w802r1lx1cydg41p8qb7hnsry2bgrfk97"
}
+2 -2
View File
@@ -108,9 +108,9 @@ class BaseTestReport:
return url
@staticmethod
def get_jenkins_link_to_rerun_e2e(branch_name="develop", pr_id="", tr_case_ids=""):
def get_jenkins_link_to_rerun_e2e(branch_name="develop", pr_id="", apk_name="", tr_case_ids=""):
return 'https://ci.status.im/job/status-mobile/job/e2e/job/status-app-prs-rerun/parambuild/' \
'?BRANCH_NAME=%s&PR_ID=%s&TR_CASE_IDS=%s' % (branch_name, pr_id, tr_case_ids)
'?BRANCH_NAME=%s&APK_NAME=%s&PR_ID=%s&TR_CASE_IDS=%s' % (branch_name, apk_name, pr_id, tr_case_ids)
def get_sauce_final_screenshot_url(self, job_id):
return 'https://media.giphy.com/media/9M5jK4GXmD5o1irGrF/giphy.gif'
+2
View File
@@ -71,11 +71,13 @@ class GithubHtmlReport(BaseTestReport):
if not_executed_tests:
html += "<li><a href=\"%s\">Rerun not executed tests</a></li>" % self.get_jenkins_link_to_rerun_e2e(
pr_id=pr_id,
apk_name=apk_name,
tr_case_ids=','.join([str(i) for i in tests]))
if failed_tests:
html += "<li><a href=\"%s\">Rerun failed tests</a></li>" % self.get_jenkins_link_to_rerun_e2e(
pr_id=pr_id,
apk_name=apk_name,
tr_case_ids=','.join([str(test.testrail_case_id) for test in tests]))
if not not_executed_tests: