Skip to content

Commit 16d6fb5

Browse files
committed
rb - update more Edge specs
1 parent 94b4109 commit 16d6fb5

File tree

3 files changed

+38
-47
lines changed

3 files changed

+38
-47
lines changed

rb/spec/integration/selenium/webdriver/options_spec.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ module WebDriver
6060
expect(cookies.first[:value]).to eq("bar")
6161
end
6262

63-
# TODO - File bug with Microsoft; This command returns unknown error:
64-
# DELETE session/EC3D38BB-BF62-4224-BB6D-E6820EF7C519/cookie/foo
65-
it "should delete one" do
66-
driver.navigate.to url_for("xhtmlTest.html")
67-
driver.manage.add_cookie :name => "foo", :value => "bar"
63+
# Edge BUG - https://connect.microsoft.com/IE/feedbackdetail/view/1864122
64+
not_compliant_on :browser => :edge do
65+
it "should delete one" do
66+
driver.navigate.to url_for("xhtmlTest.html")
67+
driver.manage.add_cookie :name => "foo", :value => "bar"
6868

69-
driver.manage.delete_cookie("foo")
69+
driver.manage.delete_cookie("foo")
70+
end
7071
end
7172

7273
# This is not a w3c supported spec

rb/spec/integration/selenium/webdriver/target_locator_spec.rb

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -207,38 +207,33 @@
207207
end
208208
end
209209

210-
describe "alerts" do
211-
not_compliant_on :browser => [:iphone, :safari, :phantomjs] do
210+
# Edge BUG - https://connect.microsoft.com/IE/feedback/details/1850030
211+
not_compliant_on :browser => [:iphone, :safari, :phantomjs, :edge] do
212+
describe "alerts" do
212213
it "allows the user to accept an alert" do
213-
driver.navigate.to url_for("alerts.html")
214-
driver.find_element(:id => "alert").click
214+
driver.navigate.to url_for("alerts.html")
215+
driver.find_element(:id => "alert").click
215216

216-
alert = wait_for_alert
217-
alert.accept
217+
alert = wait_for_alert
218+
alert.accept
218219

219-
expect(driver.title).to eq("Testing Alerts")
220-
end
221-
end
220+
expect(driver.title).to eq("Testing Alerts")
221+
end
222222

223-
not_compliant_on({:browser => :chrome, :platform => :macosx},
224-
{:browser => :iphone},
225-
{:browser => :safari},
226-
{:browser => :phantomjs}) do
227-
it "allows the user to dismiss an alert" do
228-
driver.navigate.to url_for("alerts.html")
229-
driver.find_element(:id => "alert").click
223+
not_compliant_on({:browser => :chrome, :platform => :macosx}) do
224+
it "allows the user to dismiss an alert" do
225+
driver.navigate.to url_for("alerts.html")
226+
driver.find_element(:id => "alert").click
230227

231-
alert = wait_for_alert
232-
alert.dismiss
228+
alert = wait_for_alert
229+
alert.dismiss
233230

234-
wait_for_no_alert
231+
wait_for_no_alert
235232

236-
expect(driver.title).to eq("Testing Alerts")
233+
expect(driver.title).to eq("Testing Alerts")
234+
end
237235
end
238-
end
239236

240-
# Edge BUG - https://connect.microsoft.com/IE/feedback/details/1850030
241-
not_compliant_on :browser => [:iphone, :safari, :phantomjs, :edge] do
242237
it "allows the user to set the value of a prompt" do
243238
driver.navigate.to url_for("alerts.html")
244239
driver.find_element(:id => "prompt").click
@@ -272,27 +267,24 @@
272267
expect { alert.text }.to raise_error(Selenium::WebDriver::Error::NoAlertPresentError)
273268
end
274269

275-
end
276-
277-
not_compliant_on :browser => [:ie, :iphone, :safari, :phantomjs] do
278-
it "raises NoAlertOpenError if no alert is present" do
279-
expect { driver.switch_to.alert }.to raise_error(
280-
Selenium::WebDriver::Error::NoAlertPresentError, /alert|modal dialog/i)
270+
not_compliant_on :browser => :ie do
271+
it "raises NoAlertOpenError if no alert is present" do
272+
expect { driver.switch_to.alert }.to raise_error(
273+
Selenium::WebDriver::Error::NoAlertPresentError, /alert|modal dialog/i)
274+
end
281275
end
282-
end
283276

284-
# TODO - File Edge bug; clicking for alert causes driver to hang
285-
compliant_on :browser => [:firefox, :ie, :edge] do
286-
it "raises an UnhandledAlertError if an alert has not been dealt with" do
287-
driver.navigate.to url_for("alerts.html")
288-
driver.find_element(:id => "alert").click
289-
wait_for_alert
277+
compliant_on :browser => [:firefox, :ie] do
278+
it "raises an UnhandledAlertError if an alert has not been dealt with" do
279+
driver.navigate.to url_for("alerts.html")
280+
driver.find_element(:id => "alert").click
281+
wait_for_alert
290282

291-
expect { driver.title }.to raise_error(Selenium::WebDriver::Error::UnhandledAlertError, /cheese/)
283+
expect { driver.title }.to raise_error(Selenium::WebDriver::Error::UnhandledAlertError, /cheese/)
292284

293-
expect(driver.title).to eq("Testing Alerts") # :chrome does not auto-dismiss the alert
285+
expect(driver.title).to eq("Testing Alerts") # :chrome does not auto-dismiss the alert
286+
end
294287
end
295288
end
296-
297289
end
298290
end

rb/spec/integration/selenium/webdriver/timeout_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
expect(driver.find_elements(:class_name => "redbox")).to be_empty
6464
end
6565

66-
# TODO - File bug with Microsoft - This should not return Not Found Error - {POST} /session/{sessionId}/elements
67-
# It should be a list
6866
it "should return after first attempt to find many after disabling implicit waits" do
6967
add = driver.find_element(:id => "adder")
7068

0 commit comments

Comments
 (0)