Skip to content

Commit f091afe

Browse files
committed
rb - travis doesn't like phantomjs and async
1 parent 7d983ba commit f091afe

File tree

2 files changed

+20
-26
lines changed

2 files changed

+20
-26
lines changed

rb/spec/integration/selenium/webdriver/driver_spec.rb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -255,33 +255,33 @@ module WebDriver
255255
end
256256
end
257257

258-
describe 'execute async script' do
259-
before do
260-
driver.manage.timeouts.script_timeout = 0
261-
driver.navigate.to url_for('ajaxy_page.html')
262-
end
258+
not_compliant_on browser: :phantomjs do
259+
describe 'execute async script' do
260+
before do
261+
driver.manage.timeouts.script_timeout = 0
262+
driver.navigate.to url_for('ajaxy_page.html')
263+
end
263264

264-
it 'should be able to return arrays of primitives from async scripts' do
265-
result = driver.execute_async_script "arguments[arguments.length - 1]([null, 123, 'abc', true, false]);"
266-
expect(result).to eq([nil, 123, 'abc', true, false])
267-
end
265+
it 'should be able to return arrays of primitives from async scripts' do
266+
result = driver.execute_async_script "arguments[arguments.length - 1]([null, 123, 'abc', true, false]);"
267+
expect(result).to eq([nil, 123, 'abc', true, false])
268+
end
268269

269-
not_compliant_on driver: :phantomjs do
270270
it 'should be able to pass multiple arguments to async scripts' do
271271
result = driver.execute_async_script 'arguments[arguments.length - 1](arguments[0] + arguments[1]);', 1, 2
272272
expect(result).to eq(3)
273273
end
274-
end
275274

276-
# Edge BUG - https://connect.microsoft.com/IE/feedback/details/1849991/
277-
# Firefox - https://github.com/SeleniumHQ/selenium/issues/2554
278-
not_compliant_on({driver: :remote, browser: [:firefox, :phantomjs]},
279-
{browser: :edge}) do
280-
it 'times out if the callback is not invoked' do
281-
expect do
282-
# Script is expected to be async and explicitly callback, so this should timeout.
283-
driver.execute_async_script 'return 1 + 2;'
284-
end.to raise_error(Selenium::WebDriver::Error::ScriptTimeoutError)
275+
# Edge BUG - https://connect.microsoft.com/IE/feedback/details/1849991/
276+
# Firefox - https://github.com/SeleniumHQ/selenium/issues/2554
277+
not_compliant_on({driver: :remote, browser: :firefox},
278+
{browser: :edge}) do
279+
it 'times out if the callback is not invoked' do
280+
expect do
281+
# Script is expected to be async and explicitly callback, so this should timeout.
282+
driver.execute_async_script 'return 1 + 2;'
283+
end.to raise_error(Selenium::WebDriver::Error::ScriptTimeoutError)
284+
end
285285
end
286286
end
287287
end

rb/spec/integration/selenium/webdriver/element_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
module Selenium
2323
module WebDriver
2424
describe Element do
25-
before do
26-
compliant_on browser: :safari do
27-
sleep 0.5 # Some kind of race condition preventing initial navigation; only on safari
28-
end
29-
end
30-
3125
it 'should click' do
3226
driver.navigate.to url_for('formPage.html')
3327
driver.find_element(id: 'imageButton').click

0 commit comments

Comments
 (0)