Align project paths with timeline model
This commit is contained in:
parent
9778b9023b
commit
7738c4e1c8
6 changed files with 56 additions and 55 deletions
|
|
@ -1,5 +1,6 @@
|
|||
(ns arthur.domain.feature-test
|
||||
(:require [cljs.test :refer [deftest is]]
|
||||
[arthur.domain.clip :as clip]
|
||||
[arthur.domain.feature :as feature]
|
||||
[arthur.domain.params :as params]))
|
||||
|
||||
|
|
@ -17,11 +18,14 @@
|
|||
[id {:id id :kind :eye-pair
|
||||
:subject (nth people i)
|
||||
:members ids :params {}}])) members))
|
||||
:nodes {}}))
|
||||
:timelines {:main {:id :main :frames 1 :nodes {}}}}))
|
||||
|
||||
(defn- problems [c]
|
||||
(feature/problems c (clip/nodes c)))
|
||||
|
||||
(deftest five-people-can-have-nine-identified-eyes
|
||||
(let [scene (nine-eyes)]
|
||||
(is (empty? (feature/problems scene)))
|
||||
(is (empty? (problems scene)))
|
||||
(is (= [:eye-8] (get-in scene [:groups :pair-4 :members])))
|
||||
(is (= :person-4 (get-in scene [:features :eye-8 :subject])))))
|
||||
|
||||
|
|
@ -41,11 +45,11 @@
|
|||
unpaired (feature/remove-from-pair scene :eye-0)]
|
||||
(is (= before (feature/effective-params unpaired :eye-0)))
|
||||
(is (= [:eye-1] (get-in unpaired [:groups :pair-0 :members])))
|
||||
(is (empty? (feature/problems unpaired))))))
|
||||
(is (empty? (problems unpaired))))))
|
||||
|
||||
(deftest a-pair-cannot-cross-subjects-or-own-an-eye-twice
|
||||
(let [scene (nine-eyes)]
|
||||
(is (seq (feature/problems
|
||||
(is (seq (problems
|
||||
(assoc-in scene [:groups :pair-0 :members] [:eye-0 :eye-2]))))
|
||||
(is (seq (feature/problems
|
||||
(is (seq (problems
|
||||
(assoc-in scene [:groups :pair-1 :members] [:eye-0 :eye-3]))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue