Skip to content

Commit aeae113

Browse files
committed
Add tests for new back/forward functionality, accepting a numeric argument for number of pages back/forward in history
1 parent 5bc4fdb commit aeae113

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/clj_webdriver/test/taxi.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@
2929
;; Back, forward ;;
3030
(go)
3131
(click (find-element {:tag :a, :text "example form"}))
32-
(Thread/sleep 500)
32+
(Thread/sleep 500) ;; cross-browser race condition
3333
(fact (current-url) => (str test-base-url "example-form"))
3434
(back)
3535
(fact (current-url) => test-base-url)
3636
(forward)
3737
(fact (current-url) => (str test-base-url "example-form"))
38+
(go "clojure")
39+
(back 2)
40+
(fact (current-url) => test-base-url)
41+
(forward 2)
42+
(fact (current-url) => (str test-base-url "clojure"))
3843

3944
;; To function (navigation) ;;
4045
(to (str test-base-url "example-form"))

0 commit comments

Comments
 (0)