               file-seq
               (filter #(re-matches #".*\.png$" (.getName %)))
               (map io/delete-file))))
+
+(def SOME_MARKDOWN  "A heading\n===\nSome content")
+(def SOME_HTML (hc/html (eh/to-hiccup (ec/mp SOME_MARKDOWN))))
 
 (facts "About user journeys" :functional
        (against-background 

                 (wait-for-title "Edit draft | Objective[8]")                 
                 (screenshot "12_edit_draft_empty")
                 
                 (wd/input-text "#clj-edit-draft-content" "Functional test draft title\n===\nSome content")
                 (wd/click "button[value='preview']")
                 (wait-for-title "Edit draft | Objective[8]")
                 (screenshot "13_preview_draft")


                 (wait-for-title "Policy draft | Objective[8]")
                 (screenshot "14_submitted_draft")
                 
                 {:page-title (wd/title)
                  :page-source (wd/page-source)}
                 
                 (catch Exception e
                   (screenshot "ERROR-Can-submit-a-draft")
                   (throw e)))
               => (contains {:page-title "Policy draft | Objective[8]"
                             :page-source (contains SOME_HTML)}))))
