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

Fix Linux JS Test CI job #269

Merged
merged 2 commits into from
Jan 17, 2024
Merged
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
10 changes: 9 additions & 1 deletion nbclassic/tests/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ casper.open_new_notebook = function () {

this.waitForPopup('');

this.withPopup('', function () {this.waitForSelector('.CodeMirror-code');});
this.waitFor(this.popup_has_url);
this.then(function () {
console.log('Opening a new notebook under URL: ' + this.popups[0].url);
this.open(this.popups[0].url);
});
this.waitFor(this.page_loaded);
this.waitForSelector('.CodeMirror-code');

// Hook the log and error methods of the console, forcing them to
// serialize their arguments before printing. This allows the
Expand Down Expand Up @@ -88,6 +90,12 @@ casper.page_loaded = function() {
});
};

casper.popup_has_url = function() {
// Return whether there is a popup with non blank URL.
var url = this.popups[0].url;
return typeof url !== 'undefined' && url != 'about:blank';
};

casper.kernel_running = function() {
// Return whether or not the kernel is running.
return this.evaluate(function() {
Expand Down