Skip to content

Commit

Permalink
Fix img is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
danyeaw committed Feb 13, 2025
1 parent 2a488e1 commit 1426f3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nbclassic/tests/notebook/attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ casper.notebook_test(function () {

// Validate and render the markdown cell
this.thenClick('#btn_ok');

// Wait for cell content to update before rendering
this.waitFor(function() {
return this.evaluate(function() {
var cell = Jupyter.notebook.get_cell(0);
return cell.get_text().indexOf('![') >= 0;
});
});

this.thenEvaluate(function() {
Jupyter.notebook.get_cell(0).render();
});
Expand Down

0 comments on commit 1426f3e

Please sign in to comment.