- Thread.current[:arvados_api_token] = @@API_AUTHS["admin"]['api_token']
- api.api("logs", "", {log: {
- object_uuid: uuid,
- event_type: "stderr",
- properties: {"text" => text}}})
-
- # Log div should appear when the first data point arrives by websocket.
- assert_selector '#log_graph_div', visible: true
-
- # Using datapoint 1 instead of datapoint 0 because there will be a
- # "dummy" datapoint with no actual stats 10 minutes previous to
- # the one we're looking for, for the sake of making the x-axis of
- # the graph show a full 10 minutes of time even though there is
- # only a single real datapoint.
- cpu_stat = page.evaluate_script("jobGraphData[1]['T1-cpu']")
-
- assert_equal 45.3, (cpu_stat.to_f*100).round(1)
+ assert_triggers_dom_event 'arv-log-event' do
+ use_token :active do
+ api = ArvadosApiClient.new
+ api.api("logs", "", {log: {
+ object_uuid: uuid,
+ event_type: "stderr",
+ properties: {"text" => text}}})
+ end
+ end