projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 4951-request-vm
[arvados.git]
/
apps
/
workbench
/
test
/
integration
/
websockets_test.rb
diff --git
a/apps/workbench/test/integration/websockets_test.rb
b/apps/workbench/test/integration/websockets_test.rb
index c22b3ff58fc79bd941809f603bb113232d5b7445..1ae9010983aa9ba7a8f7e698b4a2328809e15900 100644
(file)
--- a/
apps/workbench/test/integration/websockets_test.rb
+++ b/
apps/workbench/test/integration/websockets_test.rb
@@
-1,13
+1,8
@@
require 'integration_helper'
require 'integration_helper'
-require 'selenium-webdriver'
-require 'headless'
class WebsocketTest < ActionDispatch::IntegrationTest
class WebsocketTest < ActionDispatch::IntegrationTest
-
setup do
setup do
- headless = Headless.new
- headless.start
- Capybara.current_driver = :selenium
+ need_selenium "to make websockets work"
end
test "test page" do
end
test "test page" do
@@
-70,7
+65,8
@@
class WebsocketTest < ActionDispatch::IntegrationTest
assert_text '1001 hello'
# Check that new value of scrollTop is greater than the old one
assert_text '1001 hello'
# Check that new value of scrollTop is greater than the old one
- assert page.evaluate_script("$('#event_log_div').scrollTop()") > old_top
+ new_top = page.evaluate_script("$('#event_log_div').scrollTop()")
+ assert_operator new_top, :>, old_top
# Now scroll to 30 pixels from the top
page.execute_script "$('#event_log_div').scrollTop(30)"
# Now scroll to 30 pixels from the top
page.execute_script "$('#event_log_div').scrollTop(30)"
@@
-127,13
+123,13
@@
class WebsocketTest < ActionDispatch::IntegrationTest
visit(page_with_token("admin", "/jobs/#{p.uuid}"))
assert_no_text 'complete'
visit(page_with_token("admin", "/jobs/#{p.uuid}"))
assert_no_text 'complete'
- assert_no_text 'Re-run
same version
'
+ assert_no_text 'Re-run
job
'
p.state = "Complete"
p.save!
assert_text 'complete'
p.state = "Complete"
p.save!
assert_text 'complete'
- assert_text 'Re-run
same version
'
+ assert_text 'Re-run
job
'
Thread.current[:arvados_api_token] = nil
end
Thread.current[:arvados_api_token] = nil
end