mirror of
https://github.com/status-im/status-react.git
synced 2025-02-25 09:05:55 +00:00
Fix failing test for navigation task
Handle default case for ens confirmation Before navigation away the registration state is cleared and case does not handle default value for nil Remove extra space on home button Remove outdated options Fix e2e Change navigation replace arguments as per rn5 Fixes #10178 Dispatch navigation later Do not restore state for react-native-screens Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
d2478bbd34
commit
d24f4690b8
@ -117,7 +117,8 @@ public class MainActivity extends ReactFragmentActivity
|
||||
|
||||
setSecureFlag();
|
||||
SplashScreen.show(this, true);
|
||||
super.onCreate(savedInstanceState);
|
||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||
super.onCreate(null);
|
||||
|
||||
if (!shouldShowRootedNotification()) {
|
||||
configureStatus();
|
||||
|
@ -32,6 +32,7 @@
|
||||
:multiaccounts/loading true)})
|
||||
|
||||
(fx/defn initialize-views
|
||||
{:events [::initialize-view]}
|
||||
[cofx {:keys [logout?]}]
|
||||
(let [{{:multiaccounts/keys [multiaccounts] :as db} :db} cofx]
|
||||
(when (and (seq multiaccounts) (not logout?))
|
||||
@ -53,8 +54,10 @@
|
||||
{:db (-> db
|
||||
(assoc :multiaccounts/multiaccounts multiaccounts)
|
||||
(assoc :multiaccounts/logout? logout?)
|
||||
(assoc :multiaccounts/loading false))}
|
||||
(initialize-views {:logout? logout?}))))
|
||||
(assoc :multiaccounts/loading false))
|
||||
;; NOTE: Try to dispatch later navigation because of that https://github.com/react-navigation/react-navigation/issues/6879
|
||||
:dispatch-later [{:dispatch [::initialize-view {:logout? logout?}]
|
||||
:ms 100}]})))
|
||||
|
||||
(fx/defn start-app [cofx]
|
||||
(fx/merge cofx
|
||||
|
@ -371,7 +371,8 @@
|
||||
(i18n/label :t/ens-saved-title)
|
||||
;;NOTE: this state can't be reached atm
|
||||
:registration-failed
|
||||
(i18n/label :t/ens-registration-failed-title)))
|
||||
(i18n/label :t/ens-registration-failed-title)
|
||||
nil))
|
||||
|
||||
(defn- final-state-details
|
||||
[state username]
|
||||
@ -391,7 +392,8 @@
|
||||
;;NOTE: this state can't be reached atm
|
||||
:registration-failed
|
||||
[react/text {:style {:color colors/gray :font-size 14}}
|
||||
(i18n/label :t/ens-registration-failed)]))
|
||||
(i18n/label :t/ens-registration-failed)]
|
||||
nil))
|
||||
|
||||
(views/defview confirmation []
|
||||
(views/letsubs [{:keys [state username]} [:ens/confirmation-screen]]
|
||||
|
@ -120,7 +120,4 @@
|
||||
|
||||
(def home-container
|
||||
(merge
|
||||
{:flex 1}
|
||||
;;TODO move this to navigation layer
|
||||
(when platform/ios?
|
||||
{:margin-bottom tabs.styles/tabs-diff})))
|
||||
{:flex 1}))
|
||||
|
@ -126,6 +126,4 @@
|
||||
(defn navigate-replace [route params]
|
||||
(when (can-be-called?)
|
||||
(ocall @navigator-ref "dispatch"
|
||||
(ocall stack-actions "replace"
|
||||
#js {:name (name route)
|
||||
:params (clj->js params)}))))
|
||||
(ocall stack-actions "replace" (name route) (clj->js params)))))
|
||||
|
@ -39,7 +39,6 @@
|
||||
{:name :login
|
||||
:component login/login}
|
||||
{:name :create-multiaccount-generate-key
|
||||
:options {:stackPresentation "modal"}
|
||||
:component intro/wizard-generate-key}
|
||||
{:name :create-multiaccount-choose-key
|
||||
:back-handler :noop
|
||||
|
@ -594,14 +594,14 @@ class BaseView(object):
|
||||
|
||||
def get_back_to_home_view(self, times_to_click_on_back_btn=5):
|
||||
counter = 0
|
||||
from views.home_view import PlusButton
|
||||
while not PlusButton(self.driver).is_element_displayed(2):
|
||||
while BackButton(self.driver).is_element_displayed(2):
|
||||
try:
|
||||
if counter >= times_to_click_on_back_btn:
|
||||
break
|
||||
self.back_button.click()
|
||||
except (NoSuchElementException, TimeoutException):
|
||||
counter += 1
|
||||
except (NoSuchElementException, TimeoutException):
|
||||
continue
|
||||
return self.home_button.click()
|
||||
|
||||
def relogin(self, password=common_password):
|
||||
|
Loading…
x
Reference in New Issue
Block a user