0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

Add some waits on export-svg (exporter).

This commit is contained in:
Andrey Antukh 2021-03-02 13:04:43 +01:00
parent 3234b19790
commit 044aef8414

View file

@ -199,7 +199,14 @@
(process-text-nodes [page]
(log/trace :fn :process-text-nodes)
(-> (bwr/select-all page "#screenshot foreignObject")
(p/then #(p/all (map process-single-text-node %)))))
(p/then (fn [nodes]
(reduce (fn [res node]
(p/then res (fn [res]
(-> (process-single-text-node node)
(p/then (fn [result]
(conj res result)))))))
(p/resolved [])
nodes)))))
(replace-nodes-on-main [main nodes]
(let [main (parse-xml main)
@ -232,8 +239,8 @@
:scale 4})
(bwr/set-cookie! page cookie)
(bwr/navigate! page uri)
;; (bwr/sleep page 5000)
;; (bwr/wait-for page "#screenshot foreignObject" {:visible true})
(bwr/wait-for page "#screenshot foreignObject" {:visible true})
(bwr/sleep page 2000)
;; (bwr/eval! page (js* "() => document.body.style.background = 'transparent'"))
page))