Compare commits

...
9 changed files with 116 additions and 15 deletions
+1 -1
View File
@@ -1 +1 @@
1.18.0
1.19.0
+57
View File
@@ -0,0 +1,57 @@
(ns quo2.components.counter
(:require [quo.theme :as theme]
[quo.react-native :as rn]
[quo2.components.text :as text]
[quo2.foundations.colors :as colors]))
(def themes
{:light {:default colors/primary-50
:secondary colors/black-opa-5
:grey colors/neutral-30}
:dark {:default colors/primary-60
:secondary colors/white-opa-10
:grey colors/neutral-70}})
(defn get-color [key]
(get-in themes [(theme/get-theme) key]))
(defn counter
"type: default, secondary, grey
outline: true, false
value: integer"
[{:keys [type outline]} value]
(let [type (or type :default)
text-color (if (or
(= (theme/get-theme) :dark)
(and
(= type :default)
(not outline)))
colors/white
colors/black)
value (if (integer? value)
value
(js/parseInt value))
label (if (> value 99)
"99+"
(str value))
width (case (count label)
1 16
2 20
28)]
[rn/view {:style (cond-> {:align-items :center
:justify-content :center
:border-radius 6
:width width
:height 16}
outline
(merge {:border-width 1
:border-color (get-color (or type :default))})
(not outline)
(assoc :background-color (get-color (or type :default)))
(> value 99)
(assoc :padding-left 0.5))}
[text/text {:weight :medium
:size :label
:style {:color text-color}} label]]))
+2 -2
View File
@@ -18,7 +18,7 @@
(def label {:font-size 11
:line-height 15.62
:letter-spacing 0.5})
:letter-spacing -0.055})
(def font-regular {:font-family "Inter-Regular"}) ; 400
@@ -28,4 +28,4 @@
(def font-bold {:font-family "Inter-Bold"}) ; 700
(def monospace {:font-family "InterStatus-Regular"})
(def monospace {:font-family "InterStatus-Regular"})
+40
View File
@@ -0,0 +1,40 @@
(ns quo2.screens.counter
(:require [quo.react-native :as rn]
[quo.previews.preview :as preview]
[reagent.core :as reagent]
[quo2.components.counter :as quo2]
[quo.design-system.colors :as colors]))
(def descriptor [{:label "Type:"
:key :type
:type :select
:options [{:key :default
:value "Default"}
{:key :secondary
:value "Secondary"}
{:key :grey
:value "Gray"}]}
{:label "Outline?:"
:key :outline
:type :boolean}
{:label "Value"
:key :value
:type :text}])
(defn cool-preview []
(let [state (reagent/atom {:value 5 :type :default})]
(fn []
[rn/view {:margin-bottom 50
:padding 16}
[preview/customizer state descriptor]
[rn/view {:padding-vertical 60
:align-items :center}
[quo2/counter @state (:value @state)]]])))
(defn preview-counter []
[rn/view {:background-color (:ui-background @colors/theme)
:flex 1}
[rn/flat-list {:flex 1
:keyboardShouldPersistTaps :always
:header [cool-preview]
:key-fn str}]])
+6 -2
View File
@@ -6,6 +6,7 @@
[quo2.screens.button :as button]
[quo2.screens.text :as text]
[quo2.screens.tabs :as tabs]
[quo2.screens.counter :as counter]
[quo2.screens.segmented :as segmented]
[quo.core :as quo]))
@@ -20,7 +21,10 @@
:component tabs/preview-tabs}
{:name :quo2-segmented
:insets {:top false}
:component segmented/preview-segmented}])
:component segmented/preview-segmented}
{:name :quo2-counter
:insets {:top false}
:component counter/preview-counter}])
(defn theme-switcher []
[rn/view {:style {:flex-direction :row
@@ -60,4 +64,4 @@
(def main-screens [{:name :quo2-preview
:insets {:top false}
:component main-screen}])
:component main-screen}])
+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.97.0",
"commit-sha1": "9f7fc78def512929499bc2fa610f3b0e0ea1835b",
"src-sha256": "0glwvx166wkhy57ly1xwdx3657p13ckhq86zkaq0nn00wix35wqm"
"version": "v0.97.3",
"commit-sha1": "331cf1e40188553b508e81193d42e0eee6d6a8c8",
"src-sha256": "1yl7arvi6jlb591g6l2c4y41l5aqpvxcwl14iw73rp4qy4wvvcbz"
}
+1 -1
View File
@@ -28,7 +28,7 @@ pytest_config_global = dict()
test_suite_data = TestSuiteData()
appium_container = AppiumContainer()
common_password = 'qwerty'
common_password = 'qwerty1234'
unique_password = 'unique' + get_current_time()
pin = '121212'
puk = '000000000000'
@@ -187,14 +187,14 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
error = "Can create multiaccount when"
self.sign_in.just_fyi('Checking case when %s' % cases[0])
self.sign_in.create_password_input.send_keys('123456')
self.sign_in.create_password_input.send_keys('12345677')
self.sign_in.next_button.click()
if self.sign_in.maybe_later_button.is_element_displayed(10):
self.driver.fail('%s %s' % (error, cases[0]))
self.sign_in.just_fyi('Checking case when %s' % cases[1])
self.sign_in.create_password_input.send_keys('123456')
[field.send_keys('123456') for field in (self.sign_in.create_password_input, self.sign_in.confirm_your_password_input)]
self.sign_in.create_password_input.send_keys('12345677')
[field.send_keys('12345677') for field in (self.sign_in.create_password_input, self.sign_in.confirm_your_password_input)]
self.sign_in.confirm_your_password_input.delete_last_symbols(1)
self.sign_in.create_password_input.delete_last_symbols(1)
self.sign_in.next_button.click()
@@ -202,8 +202,8 @@ class TestOnboardingOneDeviceMerged(MultipleSharedDeviceTestCase):
self.driver.fail('%s %s' % (error, cases[1]))
self.sign_in.just_fyi("Checking case %s" % cases[2])
self.sign_in.create_password_input.send_keys('1234565')
self.sign_in.confirm_your_password_input.send_keys('1234567')
self.sign_in.create_password_input.send_keys('12345654')
self.sign_in.confirm_your_password_input.send_keys('12345677')
if not self.sign_in.element_by_translation_id("password_error1").is_element_displayed():
self.errors.append("'%s' is not shown" % self.sign_in.get_translation_by_key("password_error1"))
self.sign_in.create_password_input.set_value(common_password)
@@ -94,7 +94,7 @@ class TestWalletManagementDeviceMerged(MultipleSharedDeviceTestCase):
self.wallet.just_fyi("Checking basic validation when adding multiaccount")
if self.wallet.get_account_by_name(account_name).is_element_displayed():
self.drivers[0].fail('Account is added without password')
self.wallet.enter_your_password_input.send_keys('000000')
self.wallet.enter_your_password_input.send_keys('00000000')
self.wallet.add_account_generate_account_button.click()
if not self.wallet.element_by_text_part('Password seems to be incorrect').is_element_displayed():
self.drivers[0].fail("Incorrect password validation is not performed")