From a6ea50199a4aef32094bb6c4e91aa702c02aaca0 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 19 Mar 2015 18:23:19 -0400 Subject: [PATCH] 5276: Use using_wait_time 0 instead of evaluate_script. --- apps/workbench/test/integration/websockets_test.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/workbench/test/integration/websockets_test.rb b/apps/workbench/test/integration/websockets_test.rb index 2b3ba8c41c..648d59c690 100644 --- a/apps/workbench/test/integration/websockets_test.rb +++ b/apps/workbench/test/integration/websockets_test.rb @@ -184,11 +184,13 @@ class WebsocketTest < ActionDispatch::IntegrationTest end end - # Graph should have appeared (even if it hadn't above). We don't - # use capybara's matcher function because we don't want to wait: - # we are confirming the graph is visible _immediately_ after the - # first data point arrives. - assert page.evaluate_script("$('#log_graph_div').is(':visible')") + # Graph should have appeared (even if it hadn't above). It's + # important not to wait like matchers usually do: we are + # confirming the graph is visible _immediately_ after the first + # data point arrives. + using_wait_time 0 do + assert_selector '#log_graph_div', visible: true + end assert_last_datapoint 'T1-cpu', (((35.39+0.86)/10.0002)/8) end -- 2.30.2