From f510806ff22e102ca6fb10ef97ce24d037d32942 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 15 Mar 2017 10:20:29 +0100 Subject: [PATCH] fix wait condition in display_id test it was always waiting the maximum time because the condition was never met --- notebook/tests/notebook/display_id.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/notebook/tests/notebook/display_id.js b/notebook/tests/notebook/display_id.js index 6df29f0c4..6f515b3a0 100644 --- a/notebook/tests/notebook/display_id.js +++ b/notebook/tests/notebook/display_id.js @@ -110,7 +110,12 @@ casper.notebook_test(function () { kernel.output_callback_overrides_push(msg_id, callback_id); }); - this.wait_for_output(3); + this.waitFor(function () { + return this.evaluate(function () { + var cell = IPython.notebook.get_cell(3); + return cell.iopub_messages.length >= 2; + }); + }); this.wait_for_idle(); this.then(function () {