mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 11:26:12 +02:00
✨ Properly configure page default timeouts (exporter).
This commit is contained in:
parent
fb2d1e7953
commit
3fdcea78e4
3 changed files with 53 additions and 38 deletions
|
@ -253,15 +253,19 @@
|
|||
result))
|
||||
|
||||
(render-in-page [page {:keys [uri cookie] :as rctx}]
|
||||
(p/do!
|
||||
(bw/emulate! page {:viewport [1920 1080]
|
||||
:scale 4})
|
||||
(bw/set-cookie! page cookie)
|
||||
(bw/navigate! page uri)
|
||||
;; (bw/wait-for page "#screenshot foreignObject" {:visible true})
|
||||
(bw/sleep page 2000)
|
||||
;; (bw/eval! page (js* "() => document.body.style.background = 'transparent'"))
|
||||
page))
|
||||
(let [viewport {:width 1920
|
||||
:height 1080
|
||||
:scale 4}
|
||||
options {:viewport viewport
|
||||
:timeout 15000
|
||||
:cookie cookie}]
|
||||
(p/do!
|
||||
(bw/configure-page! page options)
|
||||
(bw/navigate! page uri)
|
||||
(bw/wait-for page "#screenshot")
|
||||
(bw/sleep page 2000)
|
||||
;; (bw/eval! page (js* "() => document.body.style.background = 'transparent'"))
|
||||
page)))
|
||||
|
||||
(handle [rctx page]
|
||||
(p/let [page (render-in-page page rctx)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue