From 13dfc544dfc016322eae01805f56cff8e4114b2e Mon Sep 17 00:00:00 2001 From: Serhy Date: Wed, 8 Jan 2020 16:50:35 +0200 Subject: [PATCH] add config for e2e tooltip events Signed-off-by: Serhy --- .env.e2e | 1 + .../ui/components/tooltip/styles.cljs | 18 +++++++++++------- src/status_im/utils/config.cljs | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.env.e2e b/.env.e2e index 17748e0294..4d66ddc772 100644 --- a/.env.e2e +++ b/.env.e2e @@ -19,3 +19,4 @@ PARTITIONED_TOPIC=0 CONTRACT_NODES=1 MOBILE_UI_FOR_DESKTOP=1 BLANK_PREVIEW=0 +TOOLTIP_EVENTS=1 diff --git a/src/status_im/ui/components/tooltip/styles.cljs b/src/status_im/ui/components/tooltip/styles.cljs index 0b51c6814a..54ad2e5236 100644 --- a/src/status_im/ui/components/tooltip/styles.cljs +++ b/src/status_im/ui/components/tooltip/styles.cljs @@ -1,14 +1,18 @@ (ns status-im.ui.components.tooltip.styles (:require [status-im.ui.components.colors :as colors] - [status-im.utils.styles :as styles])) + [status-im.utils.styles :as styles] + [status-im.utils.config :as config])) (def tooltip-container - {:position :absolute - :align-items :center - :pointer-events :none - :left 0 - :right 0 - :top 0}) + (merge + {:position :absolute + :align-items :center + :left 0 + :right 0 + :top 0} + ;;we need this for e2e tests + (when-not config/tooltip-events? + {:pointer-events :none}))) (styles/def bottom-tooltip-container {:position :absolute diff --git a/src/status_im/utils/config.cljs b/src/status_im/utils/config.cljs index 4c40f07328..cbed3daf1f 100644 --- a/src/status_im/utils/config.cljs +++ b/src/status_im/utils/config.cljs @@ -35,6 +35,7 @@ (def local-notifications? (enabled? (get-config :LOCAL_NOTIFICATIONS "1"))) (def blank-preview? (enabled? (get-config :BLANK_PREVIEW "1"))) (def group-chat-enabled? (enabled? (get-config :GROUP_CHATS_ENABLED "0"))) +(def tooltip-events? (enabled? (get-config :TOOLTIP_EVENTS "0"))) ;; CONFIG VALUES (def log-level