Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Template cookie-handling fns in Taxi API, comment-out non-determinist…

…ic test for timeout.
  • Loading branch information...
commit 5e9c0f71a06a97c70c1631be7d477fafb7b6b824 1 parent 066183a
@semperos authored
Showing with 15 additions and 11 deletions.
  1. +15 −11 test/clj_webdriver/test/taxi.clj
View
26 test/clj_webdriver/test/taxi.clj
@@ -62,13 +62,13 @@
(deftest-template-param
test-cookie-handling @alt-driver
- (add-cookie {:name "my_cookie" :value "my_cookie_value"})
- (is (> (count (cookies)) 0))
- (is (= (:value (cookie "my_cookie")) "my_cookie_value"))
- (delete-cookie "my_cookie")
- (is (not (some (fn [c] (= (:name c) "my_cookie")) (cookies))))
- (delete-all-cookies)
- (is (zero? (count (cookies)))))
+ (add-cookie __ {:name "my_cookie" :value "my_cookie_value"})
+ (is (> (count (cookies __)) 0))
+ (is (= (:value (cookie __ "my_cookie")) "my_cookie_value"))
+ (delete-cookie __ "my_cookie")
+ (is (not (some (fn [c] (= (:name c) "my_cookie")) (cookies __))))
+ (delete-all-cookies __)
+ (is (zero? (count (cookies __)))))
(deftest-template-param
test-finding-elements-with-CSS @alt-driver
@@ -322,10 +322,14 @@
(do
(execute-script "setTimeout(function () { window.document.title = \"test\"}, 6000)")
(wait-until #(= (title) "test") 5000 0))))
- (is (not (thrown? TimeoutException
- (do
- (execute-script "setTimeout(function () { window.document.title = \"test\"}, 7000)")
- (wait-until #(= (title) "test") 1000 0))))))
+ ;; TODO: Find more determinate test; this sometimes passes, sometimes fails, probably due to me
+ ;; interacting with the computer while the test is running.
+ ;;
+ ;; (is (not (thrown? TimeoutException
+ ;; (do
+ ;; (execute-script "setTimeout(function () { window.document.title = \"test\"}, 7000)")
+ ;; (wait-until #(= (title) "test") 1000 0)))))
+ )
(deftest-template-param
test-implicit-wait @alt-driver
Please sign in to comment.
Something went wrong with that request. Please try again.