File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ module Ferrum
67
67
expect ( browser . network . idle? ) . to be true
68
68
end
69
69
70
+ it "captures canceled requests" do
71
+ browser . go_to ( "/ferrum/with_ajax_connection_canceled" )
72
+ expect ( browser . at_xpath ( "//h1[text() = 'Canceled']" ) ) . to be
73
+ expect ( browser . network . idle? ) . to be true
74
+ end
75
+
70
76
it "keeps a running list between multiple web page views" do
71
77
browser . go_to ( "/ferrum/with_js" )
72
78
expect ( traffic . length ) . to eq ( 4 )
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta http-equiv ="Content-type " content ="text/html; charset=utf-8 "/>
5
+ < title > ferrum with_js</ title >
6
+ < script src ="/ferrum/jquery.min.js " type ="text/javascript " charset ="utf-8 "> </ script >
7
+ </ head >
8
+ < body >
9
+ < h1 > Here</ h1 >
10
+ < script >
11
+ $ . ajax ( "http://localhost:12345/slow_response" ) . abort ( ) ;
12
+ $ ( "h1" ) . text ( "Canceled" ) ;
13
+ </ script >
14
+ </ body >
15
+ </ html >
You can’t perform that action at this time.
0 commit comments