##// END OF EJS Templates
Fix event tests
Jessica B. Hamrick -
Show More
@@ -249,7 +249,11 define([
249
249
250 var that = this;
250 var that = this;
251 var on_success = function (data, status, xhr) {
251 var on_success = function (data, status, xhr) {
252 that.kernel_info(); // get kernel info so we know what state the kernel is in
252 that.events.trigger('status_busy.Kernel', {kernel: this});
253 // get kernel info so we know what state the kernel is in
254 that.kernel_info(function () {
255 that.events.trigger('status_idle.Kernel', {kernel: this});
256 });
253 if (success) {
257 if (success) {
254 success(data, status, xhr);
258 success(data, status, xhr);
255 }
259 }
@@ -380,7 +384,12 define([
380 */
384 */
381 Kernel.prototype._kernel_connected = function () {
385 Kernel.prototype._kernel_connected = function () {
382 this.events.trigger('status_connected.Kernel', {kernel: this});
386 this.events.trigger('status_connected.Kernel', {kernel: this});
383 this.kernel_info(); // get kernel info so we know what state the kernel is in
387 this.events.trigger('status_busy.Kernel', {kernel: this});
388 // get kernel info so we know what state the kernel is in
389 var that = this;
390 this.kernel_info(function () {
391 that.events.trigger('status_idle.Kernel', {kernel: this});
392 });
384 };
393 };
385
394
386 /**
395 /**
@@ -197,7 +197,11 casper.notebook_test(function () {
197 'status_killed.Kernel',
197 'status_killed.Kernel',
198 'kernel_started.Kernel',
198 'kernel_started.Kernel',
199 'status_connected.Kernel',
199 'status_connected.Kernel',
200 'status_starting.Kernel',
200 // technically we should get this message, but sometimes the kernel
201 // finishes starting before we connect to it so then we don't receive
202 // this message
203 //
204 //'status_starting.Kernel',
201 'status_busy.Kernel',
205 'status_busy.Kernel',
202 'status_idle.Kernel'
206 'status_idle.Kernel'
203 ],
207 ],
@@ -240,7 +244,11 casper.notebook_test(function () {
240 'status_restarting.Kernel',
244 'status_restarting.Kernel',
241 'kernel_started.Kernel',
245 'kernel_started.Kernel',
242 'status_connected.Kernel',
246 'status_connected.Kernel',
243 'status_starting.Kernel',
247 // technically we should get this message, but sometimes the kernel
248 // finishes starting before we connect to it so then we don't receive
249 // this message
250 //
251 //'status_starting.Kernel',
244 'status_busy.Kernel',
252 'status_busy.Kernel',
245 'status_idle.Kernel'
253 'status_idle.Kernel'
246 ],
254 ],
@@ -104,7 +104,11 casper.notebook_test(function () {
104 [
104 [
105 'kernel_started.Session',
105 'kernel_started.Session',
106 'status_connected.Kernel',
106 'status_connected.Kernel',
107 'status_starting.Kernel',
107 // technically we should get this message, but sometimes the kernel
108 // finishes starting before we connect to it so then we don't receive
109 // this message
110 //
111 //'status_starting.Kernel',
108 'status_busy.Kernel',
112 'status_busy.Kernel',
109 'status_idle.Kernel'
113 'status_idle.Kernel'
110 ],
114 ],
@@ -135,7 +139,11 casper.notebook_test(function () {
135 'status_killed.Session',
139 'status_killed.Session',
136 'kernel_started.Session',
140 'kernel_started.Session',
137 'status_connected.Kernel',
141 'status_connected.Kernel',
138 'status_starting.Kernel',
142 // technically we should get this message, but sometimes the kernel
143 // finishes starting before we connect to it so then we don't receive
144 // this message
145 //
146 //'status_starting.Kernel',
139 'status_busy.Kernel',
147 'status_busy.Kernel',
140 'status_idle.Kernel'
148 'status_idle.Kernel'
141 ],
149 ],
General Comments 0
You need to be logged in to leave comments. Login now