Skip to content

Add test comparing WebP and JPEG sub-size dimensions - #2696

Open
sonali195 wants to merge 3 commits into
WordPress:trunkfrom
sonali195:fix/issue-1234-short-description
Open

sonali195 wants to merge 3 commits into
WordPress:trunkfrom
sonali195:fix/issue-1234-short-description

Conversation

@sonali195

Copy link
Copy Markdown

Summary

Adds a PHPUnit test checking that each WebP sub-size has the same width and
height as the matching JPEG sub-size in the attachment metadata, using an image
large enough to be scaled.

Fixes #ISSUE_NUMBER

How to test

  1. Run npm run wp-env-test start.
  2. Run npm run test-php -- --filter test_it_should_create_webp_subsizes_with_the_same_dimensions.

Use of AI tools

I used Claude to help draft the test. I reviewed the code and ran the test myself.

Hi! I'd like to work on this. I'm going to start by adding a PHPUnit test that
compares the WebP sub-size dimensions with the JPEG sub-sizes in the metadata,
to reproduce the problem. Is this still available?
@github-actions github-actions Bot added the [Plugin] Modern Image Formats Formerly WebP Uploads [slug: webp-uploads] label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sonali195 <sonaliprajapati@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Comment thread plugins/webp-uploads/tests/test-load.php
Fix test formatting for coding standards
@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature no milestone PRs that do not have a defined milestone for release labels Oct 6, 2026
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.50%. Comparing base (a25f804) to head (9802832).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2696   +/-   ##
=======================================
  Coverage   70.50%   70.50%           
=======================================
  Files          91       91           
  Lines        7869     7869           
=======================================
  Hits         5548     5548           
  Misses       2321     2321           
Flag Coverage Δ
multisite 70.50% <ø> (ø)
single 35.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

This branch has not been deployed

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

Labels

no milestone PRs that do not have a defined milestone for release [Plugin] Modern Image Formats Formerly WebP Uploads [slug: webp-uploads] [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants