Skip to content

Re-enable passing HSLA/HSBA getter tests in p5.Color - #9166

Merged
perminder-17 merged 3 commits into
processing:mainfrom
Shruti2110-coder:reenable-color-todo-tests
Sep 20, 2026
Merged

perminder-17 merged 3 commits into
processing:mainfrom
Shruti2110-coder:reenable-color-todo-tests

Conversation

@Shruti2110-coder

Copy link
Copy Markdown
Contributor

Resolves #9139

Five test.todo → test in test/unit/color/p5.Color.js (lines 467, 490, 517,
637, 685). No source changes.

These were disabled in 7af4967 ("Mark most failing tests as todos", Sep 2024)
during the 2.0 work and pass on current main. They cover the HSL/HSB getters
reached via three different string-parsing paths (rgba(), hsla(), hsba()).

Verified against current main after rebase:

  • test/unit/color/p5.Color.js passes 97/97
  • npm run lint unchanged at 6 warnings / 0 errors
  • The five fail as expected when _getHue() is deliberately broken
    (AssertionError: expected 999 to be close to 336 +/- 0.5), so they exercise
    the code rather than passing vacuously

Left alone: line 252's suite.todo('invalid string') has no body and is a
genuinely unwritten test.

@p5-bot

p5-bot Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: 73c6d0b

Previous deployments

c3ca93b


This is an automated message.

@perminder-17 perminder-17 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @Shruti2110-coder, I noticed the typography screenshot test, is failing on this branch, but I haven’t seen it fail on the other branches I’ve tested.

Is this a flaky test, or could it be related to re-enabling the color tests? I’ll take a deeper look soon, but let me know if you have any ideas about what might be causing it.

@Shruti2110-coder

Copy link
Copy Markdown
Contributor Author

Hi @perminder-17

I looked into it and I think it's the flaky font test from #8274, not related to this PR.

I ran the full test suite locally twice on this branch without changing anything. The first run failed only on can control non-variable fonts, and the second run passed everything. typography.js also passes on its own on both this branch and main.

In the failed screenshot, the text that should be regular weight was drawn in bold, so it looks like the font weight just hadn't loaded in time.

This PR only changes the five color tests, which don't touch fonts or canvases. Could you re-run the CI when you get a chance?

@perminder-17 perminder-17 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe the tests were flaky, I ran the tests now so it passed and the failing tests also seems unrelated to this PR.

Thanks for your work on this!

@perminder-17
perminder-17 merged commit 6f89145 into processing:main Sep 20, 2026
4 checks passed
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.

Re-enable 5 passing .todo tests in test/unit/color/p5.Color.js

2 participants