Skip to content

Add contrast color regression coverage - #1049

Merged
9larsons merged 1 commit into
mainfrom
agent/test-more-contrast-colors
Aug 10, 2026
Merged

Add contrast color regression coverage#1049
9larsons merged 1 commit into
mainfrom
agent/test-more-contrast-colors

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

Summary

Adds five independent regression cases for textColorForBackgroundColor following #1031. This is a tests-only change: all existing assertions remain intact and no production or generated files change.

Coverage

A deliberate check using the previous Color.b() calculation fails four of the five added cases, confirming the new cases protect the visual correction in #1031.

Validation

  • yarn workspace @tryghost/color-utils build
  • yarn workspace @tryghost/color-utils test — 16 tests passed, 100% coverage
  • yarn test — SDK-wide lint and tests passed across all 17 projects
  • git diff --check

Refs #1031 and TryGhost/Ghost#27797.

refs #1031
refs TryGhost/Ghost#27797

Covered the reported lavender, pink, and blue backgrounds plus grays surrounding the YIQ threshold without changing existing assertions.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 368b9b45-4f2e-4c06-97df-77eedfc55ab5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (07144be) to head (4ae537d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1049   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines         3060      3060           
  Branches       459       459           
=========================================
  Hits          3060      3060           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons
9larsons marked this pull request as ready for review August 10, 2026 19:24
@9larsons
9larsons merged commit 2229813 into main Aug 10, 2026
6 checks passed
@9larsons
9larsons deleted the agent/test-more-contrast-colors branch August 10, 2026 19:24
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