@@ -77,27 +77,36 @@ module WebDriver
7777 expect ( cookies . first [ :value ] ) . to eq ( 'bar' )
7878 end
7979
80- # Edge BUG - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5751773/
81- not_compliant_on browser : :edge do
82- it 'should delete one ' do
80+ # Firefox - https://bugzilla.mozilla.org/show_bug.cgi?id=1282970
81+ not_compliant_on browser : :firefox do
82+ it 'should get named cookie ' do
8383 driver . navigate . to url_for ( 'xhtmlTest.html' )
8484 driver . manage . add_cookie name : 'foo' , value : 'bar'
8585
86- driver . manage . delete_cookie ( 'foo' )
86+ expect ( driver . manage . cookie_named ( 'foo' ) [ :value ] ) . to eq ( 'bar ')
8787 end
8888 end
8989
9090 # Edge BUG - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5751773/
9191 not_compliant_on browser : :edge do
92- it 'should delete all ' do
92+ it 'should delete one ' do
9393 driver . navigate . to url_for ( 'xhtmlTest.html' )
94-
9594 driver . manage . add_cookie name : 'foo' , value : 'bar'
96- driver . manage . delete_all_cookies
97- expect ( driver . manage . all_cookies ) . to be_empty
95+
96+ driver . manage . delete_cookie ( 'foo' )
97+ expect ( driver . manage . all_cookies . find { |c | c [ :name ] == 'foo' } ) . to be_nil
9898 end
9999 end
100100
101+ it 'should delete all' do
102+ driver . navigate . to url_for ( 'xhtmlTest.html' )
103+
104+ driver . manage . add_cookie name : 'foo' , value : 'bar'
105+ driver . manage . add_cookie name : 'bar' , value : 'foo'
106+ driver . manage . delete_all_cookies
107+ expect ( driver . manage . all_cookies ) . to be_empty
108+ end
109+
101110 # Firefox - https://bugzilla.mozilla.org/show_bug.cgi?id=1256007
102111 not_compliant_on browser : :firefox do
103112 it 'should use DateTime for expires' do
0 commit comments