Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JS Test Docs for macOS and Fix Flaky Test #320

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ or to run just ``nbclassic/tests/notebook/deletecell.js``::

python -m nbclassic.jstest notebook/deletecell.js

.. note::
If you are getting spawn errors with an ARM Mac on macOS, make sure you
have Rosetta installed.


Building the Documentation
--------------------------
Expand Down
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
Loading