Skip to content

Update QUnit to latest stable version, update tests for jQuery 3, and switch from PhantomJS to node-qunit-puppeteer in CI workflow - #823

Merged
ElDeveloper merged 11 commits into
biocore:masterfrom
actapia:qunit2-pr
Dec 21, 2025
Merged

ElDeveloper merged 11 commits into
biocore:masterfrom
actapia:qunit2-pr

Conversation

@actapia

@actapia actapia commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

These changes update QUnit to the latest stable version as of this writing (version 2.24) and update the QUnit tests accordingly. Together with #822 , this pull request addresses #820 . These commits also include changes to the QUnit tests to accommodate an upgrade to jQuery 3 (mainly changes to make parts of tests asynchronous).

Since PhantomJS does not work well with ES6 (used in jQuery 3), these changes also replace PhantomJS with node-qunit-puppeteer in the Emperor CI workflow.

@ElDeveloper ElDeveloper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@actapia This looks great to me. I appreciate all the effort you put into this PR.

  • Would you mind expanding on what the appendTo argument means and why is it needed?

* @param {String[]} uniqueVals Array of unique values for the category
* @param {Object} data SlickGrid formatted data from setCategory function
*
*,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*,
*

Comment on lines +185 to +186
// this.ready = undefined;
this.ready = null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// this.ready = undefined;
this.ready = null;
this.ready = null;

Comment thread emperor/support_files/js/controller.js Outdated
// setup the jquery properties of the button
scope.$optionsButton.button({text: false,
icons: {primary: ' ui-icon-gear'}});
scope.$optionsButton.button({showLabel: false,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one note this isn't showing the gear icon anymore:

Screenshot 2025-10-13 at 10 21 35 AM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way that button icons are set was changed in the new version of jQuery UI, and it looks like I inadvertently included that change in both this pull request and #822 . I've changed it back to the old version for this pull request, so the icons should show up again.

text: false, icons: {primary: ' ui-icon-circle-arrow-s'}
}).attr('title', 'Download Scree Plot');
}).button(
{showLabel: false, icon: 'ui-icon-circle-arrow-s'}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the gear icon, this isn't showing the download icon in the axes tab:

Screenshot 2025-10-13 at 10 21 45 AM

Comment thread tests/javascript_tests/index.html
Comment thread tests/javascript_tests/test_animate.js Outdated
equal(director.trajectories[1].metadataCategoryName, 'Fast', 'The' +
assert.equal(director.mappingFileHeaders,
this.mappingFileHeaders,
'The mapping file headers are set correctly');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'The mapping file headers are set correctly');
'The mapping file headers are set correctly');

this.controllerProcrustes._$otherEdgeColor.spectrum('destroy');

this.controller = undefined;
// if (this.controller !== undefined) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you uncomment this block or if it is no longer needed can you delete this?

@ElDeveloper

Copy link
Copy Markdown
Member

And, also thank you for your patience!

@actapia

actapia commented Dec 14, 2025

Copy link
Copy Markdown
Contributor Author

@actapia This looks great to me. I appreciate all the effort you put into this PR.

  • Would you mind expanding on what the appendTo argument means and why is it needed?

Thank you. I added the appendTo argument to control to which HTML element the Spectrum containers get added. I use that in the QUnit tests so that the Spectrum containers are added to the QUnit fixture in the tests (instead of the default body), which allows QUnit to properly clean up after tests that use Spectrum. When appendTo is not specified, the constructor should retain its original behavior. I've added more text to the relevant JSDoc comment that should hopefully make that a bit clearer.

@actapia
actapia requested a review from ElDeveloper December 14, 2025 23:39

@ElDeveloper ElDeveloper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, this looks in great shape! Thank you for the explanations @actapia. I am in the process of releasing a new version to PyPI (see #826). After that's done I will get this merged (hopefully later today or tomorrow).

@ElDeveloper

Copy link
Copy Markdown
Member

Only quirk might be sorting out conflicts with the changelog, but I think I should be able to handle that - I'll keep you posted.

After that we can get #822 merged as well.

@ElDeveloper
ElDeveloper merged commit d9c2d04 into biocore:master Dec 21, 2025
3 checks passed
@ElDeveloper

Copy link
Copy Markdown
Member

Thank you @actapia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants