Przeglądaj źródła

fix: tests altered by last commit

Also add a block-ref example to last whiteboard test page
Gabriel Horner 1 rok temu
rodzic
commit
1f9b893ba0

+ 1 - 1
deps/graph-parser/test/logseq/graph_parser/cli_test.cljs

@@ -32,7 +32,7 @@
     (docs-graph-helper/docs-graph-assertions @conn graph-dir files)
 
     (testing "Additional counts"
-      (is (= 48766 (count (d/datoms @conn :eavt))) "Correct datoms count"))
+      (is (= 48767 (count (d/datoms @conn :eavt))) "Correct datoms count"))
 
     (testing "Asts"
       (is (seq asts) "Asts returned are non-zero")

+ 2 - 1
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_04_01.md

@@ -1,4 +1,5 @@
 - only deadline
+  id:: 669168ed-8734-4943-8a86-5e3a553a526d
   DEADLINE: <2022-11-26 Sat>
 - only scheduled
   SCHEDULED: <2022-11-25 Fri .+1d>
@@ -6,4 +7,4 @@
 - DOING [#B] status test
   :LOGBOOK:
   CLOCK: [2024-04-01 Mon 10:39:40]
-  :END:
+  :END:

+ 43 - 7
deps/graph-parser/test/resources/exporter-test-graph/whiteboards/ref page.edn

@@ -1,14 +1,15 @@
 {:blocks (
-{:block/content "new block [[some page]]"
+{:block/content "block with page ref [[some page]]"
 :block/created-at 1720805247589
 :block/format :markdown
 :block/parent 
 {:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"}
 :block/properties 
 {}
-:block/updated-at 1720805270629
+:block/updated-at 1720809014394
 :block/uuid #uuid "6691677f-c208-4c83-aa40-6efc4286100c"} 
-{:block/properties 
+{:block/created-at 1720808993087
+:block/properties 
 {:ls-type :whiteboard-shape
 :logseq.tldraw.shape 
 {:blockType "B"
@@ -33,10 +34,45 @@
 :collapsedHeight 0
 :nonce 1720805246071
 :pageName nil}}
-:block/updated-at 1720805262144
-:block/created-at 1720805262144})
+:block/updated-at 1720808993087} 
+{:block/content "block with block ref ((669168ed-8734-4943-8a86-5e3a553a526d))"
+:block/created-at 1720808993012
+:block/format :markdown
+:block/parent 
+{:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"}
+:block/properties 
+{}
+:block/updated-at 1720809157098
+:block/uuid #uuid "66917621-93ae-475b-aa4c-6ae9e797cf68"} 
+{:block/properties 
+{:ls-type :whiteboard-shape
+:logseq.tldraw.shape 
+{:blockType "B"
+:stroke ""
+:collapsed false
+:borderRadius 8
+:scale [1 1]
+:pageId "66917621-93ae-475b-aa4c-6ae9e797cf68"
+:scaleLevel "md"
+:fill ""
+:compact true
+:isAutoResizing true
+:type "logseq-portal"
+:size [400 79.9781265258789]
+:strokeType "line"
+:strokeWidth 2
+:opacity 1
+:id "b999ee10-407c-11ef-956e-7d9aebf284ae"
+:noFill false
+:point [478.6382088826831 337.7821947259741]
+:parentId "6691676f-2eed-4619-b56a-69fd7d572c59"
+:collapsedHeight 0
+:nonce 1720808990579
+:pageName nil}}
+:block/updated-at 1720809157310
+:block/created-at 1720809157310})
 :pages (
-{:block/tx-id 536871836
+{:block/tx-id 536871072
 :block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"
 :block/properties 
 {:ls-type :whiteboard-page
@@ -47,7 +83,7 @@
 {}
 :nonce 1
 :assets []}}
-:block/updated-at 1720805270629
+:block/updated-at 1720809157310
 :block/created-at 1720805231835
 :block/format :markdown
 :block/type ["page" "whiteboard"]

+ 1 - 1
src/test/frontend/handler/repo_test.cljs

@@ -25,7 +25,7 @@
 
     (docs-graph-helper/docs-graph-assertions db graph-dir (map :file/path files))
     (testing "Additional Counts"
-      (is (= 64476 (count (d/datoms db :eavt))) "Correct datoms count")
+      (is (= 64477 (count (d/datoms db :eavt))) "Correct datoms count")
 
       (is (= 5946
              (ffirst