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

Prepare for QUnit 3.0 #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Prepare for QUnit 3.0 #8

wants to merge 1 commit into from

Conversation

Krinkle
Copy link

@Krinkle Krinkle commented Aug 20, 2024

Tweak a few selectors so that the theme is compatible with QUnit 3.0 (currently in alpha).

QUnit 3.0.0-alpha.2 Before After
Screenshot Screenshot Screenshot

Reference:


  • Limit #qunit-tests li to #qunit-tests > li so that the grey background won't start applying to assertions. Previously, upstream set its white background via #qunit-tests li li.pass which was stronger. QUnit 3.0.0-alpha.2 sets this on .qunit-assert-list .pass instead.
  • Use #qunit-tests > li and #qunit-tests > li.{pass,fail} elsewhere too for consistency with the above and with (new) documentation at https://qunitjs.com/browser/#theme-api.
  • Simplify .qunit-source selector, as that seems to be enough on both QUnit 2 and QUnit 3.
  • Simplify .qunit-assert-list selector, idem.
  • Use #qunit-tests .qunit-assert-list .pass instead of #qunit-tests li li.pass. In the future, .qunit-assert-list .pass should suffice but for now we need the ID in order for the theme to remain effective in QUnit 2 as well.
  • Apply #qunit-userAgent override only in QUnit 2. In 3.0, the default might suite you better? (Text shadow was removed in HTML Reporter: QUnit 3.0 theme structure and layout qunitjs/qunit#1774).
  • Apply #qunit-modulefilter-search-container:after override only in QUnit 2. In 3.0, the positioning logic doesn't work right (icon shifted down). This could be fixed by setting min-height instead of height. But, given the icon was upstreamed in HTML Reporter: QUnit 3.0 theme structure and layout qunitjs/qunit#1774, the default would achieve the same effect.

Copy link

changeset-bot bot commented Aug 20, 2024

🦋 Changeset detected

Latest commit: c4f2feb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
qunit-theme-ember Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Krinkle Krinkle force-pushed the patch-1 branch 2 times, most recently from d11d8a0 to c4f2feb Compare August 20, 2024 14:06
Tweak a few selectors so that the theme is compatible with
QUnit 3.0 (currently in alpha).

Selectors based on docs at
https://qunitjs.com/browser/#theme-api
@IgnaceMaes
Copy link
Owner

Thanks for making the changes here. Nice to see the QUnit out of the box experience improving too. Just want to acknowledge already I've seen your work. Haven't had much time, but hoping to take a look in the near future.

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