Revert "Hide key storage selection screen temporarily"
This reverts commit 8764fafc42
.
This commit is contained in:
parent
8764fafc42
commit
3a903fbaa2
|
@ -38,17 +38,11 @@
|
||||||
|
|
||||||
(defn dec-step [step]
|
(defn dec-step [step]
|
||||||
(let [inverted (map-invert step-kw-to-num)]
|
(let [inverted (map-invert step-kw-to-num)]
|
||||||
; Skip select-key-storage step
|
(inverted (dec (step-kw-to-num step)))))
|
||||||
(if (= step :create-code)
|
|
||||||
:choose-key
|
|
||||||
(inverted (dec (step-kw-to-num step))))))
|
|
||||||
|
|
||||||
(defn inc-step [step]
|
(defn inc-step [step]
|
||||||
(let [inverted (map-invert step-kw-to-num)]
|
(let [inverted (map-invert step-kw-to-num)]
|
||||||
; Skip select-key-storage step
|
(inverted (inc (step-kw-to-num step)))))
|
||||||
(if (= step :choose-key)
|
|
||||||
:create-code
|
|
||||||
(inverted (inc (step-kw-to-num step))))))
|
|
||||||
|
|
||||||
(defn get-status [cofx]
|
(defn get-status [cofx]
|
||||||
(assoc cofx :status (rand-nth statuses/data)))
|
(assoc cofx :status (rand-nth statuses/data)))
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(testing "Back from create-code"
|
(testing "Back from create-code"
|
||||||
(let [db {:intro-wizard {:step :create-code :key-code "qwerty"}}
|
(let [db {:intro-wizard {:step :create-code :key-code "qwerty"}}
|
||||||
result (get-in (models/intro-step-back {:db db}) [:db :intro-wizard])]
|
result (get-in (models/intro-step-back {:db db}) [:db :intro-wizard])]
|
||||||
(is (= result {:step :choose-key :key-code nil :weak-password? true}))))
|
(is (= result {:step :select-key-storage :key-code nil :weak-password? true}))))
|
||||||
|
|
||||||
(testing "Back from confirm-code"
|
(testing "Back from confirm-code"
|
||||||
(let [db {:intro-wizard {:step :confirm-code :confirm-failure? true}}
|
(let [db {:intro-wizard {:step :confirm-code :confirm-failure? true}}
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
;; In this case intro-step-forward returns fx/merge result which is an fn
|
;; In this case intro-step-forward returns fx/merge result which is an fn
|
||||||
;; to be invoked on cofx
|
;; to be invoked on cofx
|
||||||
result (get-in ((models/intro-step-forward {:db db}) {:db db}) [:db :intro-wizard])]
|
result (get-in ((models/intro-step-forward {:db db}) {:db db}) [:db :intro-wizard])]
|
||||||
(is (= result {:step :create-code}))))
|
(is (= result {:step :select-key-storage}))))
|
||||||
|
|
||||||
(testing "Forward from generate-key"
|
(testing "Forward from generate-key"
|
||||||
(let [db {:intro-wizard {:step :generate-key}}
|
(let [db {:intro-wizard {:step :generate-key}}
|
||||||
|
|
Loading…
Reference in New Issue