##// END OF EJS Templates
Merge pull request #4451 from ivanov/shutdown-js...
Paul Ivanov -
r13445:1afe8a50 merge
parent child Browse files
Show More
@@ -8,6 +8,22 b' casper.notebook_test(function () {'
8 // to just test.
8 // to just test.
9 //this.test.begin("shutdown tests (notebook)", 2, function(test) {
9 //this.test.begin("shutdown tests (notebook)", 2, function(test) {
10
10
11 // Our shutdown test closes the browser window, which will delete the
12 // casper browser object, and the rest of the test suite will fail with
13 // errors that look like:
14 //
15 // "Error: cannot access member `evaluate' of deleted QObject"
16 //
17 // So what we do here is make a quick popup window, and run the test inside
18 // of it.
19 this.then(function() {
20 this.evaluate(function(url){
21 window.open(url);
22 }, {url : this.getCurrentUrl()});
23 })
24
25 this.waitForPopup('');
26 this.withPopup('', function () {
11 this.thenEvaluate(function () {
27 this.thenEvaluate(function () {
12 $('#kill_and_exit').click();
28 $('#kill_and_exit').click();
13 });
29 });
@@ -18,13 +34,13 b' casper.notebook_test(function () {'
18 cell.execute();
34 cell.execute();
19 });
35 });
20
36
21 // refactor this into just a get_output(0)
22 this.then(function () {
37 this.then(function () {
23 var result = this.get_output_cell(0);
38 var result = this.get_output_cell(0);
24 this.test.assertFalsy(result, "after shutdown: no execution results");
39 this.test.assertFalsy(result, "after shutdown: no execution results");
25 this.test.assertNot(this.kernel_running(),
40 this.test.assertNot(this.kernel_running(),
26 'after shutdown: IPython.notebook.kernel.running is false ');
41 'after shutdown: IPython.notebook.kernel.running is false ');
27 });
42 });
43 });
28
44
29 //}); // end of test.begin
45 //}); // end of test.begin
30 });
46 });
General Comments 0
You need to be logged in to leave comments. Login now