raft/tests/run.scm
Daniel Ziltener 1439bd4aa6
Egg exports, fixed tests
FossilOrigin-Name: 9fda0ddb1e6272d88a0677b7596b1fa888cb62fb1394872cd572e26dbdcce4c2
2023-11-09 01:21:50 +01:00

53 lines
1.8 KiB
Scheme

(import (chicken string))
(import r7rs
test
(chicken base)
(chicken string)
(chicken process)
(chicken gc)
srfi-34 ;;Exception Handling
srfi-35 ;;Exception Types
base64 ;;decoding screenshot data
http-client ;;API interaction
intarweb ;;Supporting HTTP functionality
uri-common ;;Supporting HTTP functionality
coops ;;Object system
alist-lib ;;Handling alists from JSON objects
medea ;;JSON handling
)
;; [[file:../webdriver.org::*Dependencies][Dependencies:5]]
(include-relative "../webdriver-impl.scm")
;; Dependencies:5 ends here
;; #+name: wd-session-test
;; [[file:../webdriver.org::wd-session-test][wd-session-test]]
(test-group "session"
(let ((browser (new-WebDriver <Gecko>)))
(test "Initial state" #f (slot-value browser 'session-id))
(test-assert "Session id check" (string? (begin (initialize-session browser) (slot-value browser 'session-id))))
(test-assert "Session id after termination" (eq? #f (begin (terminate-session browser) (slot-value browser 'session-id))))
(terminate browser)))
;; wd-session-test ends here
;; #+name: wd-url-test
;; [[file:../webdriver.org::wd-url-test][wd-url-test]]
(test-group "url"
(let ((browser (new-WebDriver <Gecko>)))
(test "Initial state" #f (slot-value browser 'session-id))
(test "Navigating to the first website" "http://info.cern.ch/hypertext/WWW/TheProject.html"
(begin (initialize-session browser)
(set-url browser "http://info.cern.ch/hypertext/WWW/TheProject.html")
(url browser)))
(terminate browser)))
;; wd-url-test ends here
;; [[file:../webdriver.org::*About This Egg][About This Egg:2]]
(test-exit)
;; About This Egg:2 ends here