|
1094 | 1094 | {:class :inside} {:tag :span}])))))
|
1095 | 1095 |
|
1096 | 1096 | (deftest test-timeouts
|
1097 |
| - (let [timeouts {:implicit 32134 |
1098 |
| - :script 78921 |
1099 |
| - :pageLoad 98765}] |
1100 |
| - (e/set-timeouts *driver* timeouts) |
1101 |
| - (is (= timeouts (e/get-timeouts *driver*))) |
1102 |
| - (e/set-page-load-timeout *driver* 987) |
1103 |
| - (e/set-implicit-timeout *driver* 876) |
1104 |
| - (e/set-script-timeout *driver* 765) |
1105 |
| - (is (= 987 (e/get-page-load-timeout *driver*))) |
1106 |
| - (is (= 876 (e/get-implicit-timeout *driver*))) |
1107 |
| - (is (= 765 (e/get-script-timeout *driver*))) |
1108 |
| - (is (= {:pageLoad 987000 :implicit 876000 :script 765000} |
1109 |
| - (e/get-timeouts *driver*))))) |
| 1097 | + (testing "basic timeout tests" |
| 1098 | + (let [timeouts {:implicit 32134 |
| 1099 | + :script 78921 |
| 1100 | + :pageLoad 98765}] |
| 1101 | + (e/set-timeouts *driver* timeouts) |
| 1102 | + (is (= timeouts (e/get-timeouts *driver*))) |
| 1103 | + (e/set-page-load-timeout *driver* 987) |
| 1104 | + (e/set-implicit-timeout *driver* 876) |
| 1105 | + (e/set-script-timeout *driver* 765) |
| 1106 | + (is (= 987 (e/get-page-load-timeout *driver*))) |
| 1107 | + (is (= 876 (e/get-implicit-timeout *driver*))) |
| 1108 | + (is (= 765 (e/get-script-timeout *driver*))) |
| 1109 | + (is (= {:pageLoad 987000 :implicit 876000 :script 765000} |
| 1110 | + (e/get-timeouts *driver*))))) |
| 1111 | + (testing "non-integer timeout values" |
| 1112 | + ;; These should not throw. If they do, the test runner will record |
| 1113 | + ;; a test failure. |
| 1114 | + (is (do (e/set-page-load-timeout *driver* 1.33333) |
| 1115 | + true)) |
| 1116 | + (is (do (e/set-page-load-timeout *driver* 100/3) |
| 1117 | + true)))) |
1110 | 1118 |
|
1111 | 1119 | (comment
|
1112 | 1120 | ;; start test server
|
|
0 commit comments