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

Modern Image Formats: Fix unit tests that failing on WP trunk #1635

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

Conversation

mukeshpanchal27
Copy link
Member

Summary

Fixes #1634

@mukeshpanchal27 mukeshpanchal27 added [Type] Bug An existing feature is broken [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) skip changelog PRs that should not be mentioned in changelogs labels Nov 6, 2024
@mukeshpanchal27 mukeshpanchal27 added this to the webp-uploads n.e.x.t milestone Nov 6, 2024
@mukeshpanchal27 mukeshpanchal27 self-assigned this Nov 6, 2024
@mukeshpanchal27
Copy link
Member Author

There are currently 5 unit tests which are failing on trunk:

There were 5 failures:
1) Test_WebP_Uploads_Load::test_it_should_not_create_the_original_mime_type_for_jpeg_images with data set "webp" ('webp')

Failed asserting that '2024/11/leaves-17-1080x720.webp' ends with "leaves-17-1080x720-webp.webp".
/var/www/html/wp-content/plugins/performance/plugins/webp-uploads/tests/test-load.php:63

2) Test_WebP_Uploads_Load::test_it_should_not_create_the_original_mime_type_for_jpeg_images with data set "avif" ('avif')

Failed asserting that '2024/11/leaves-18-1080x720.avif' ends with "leaves-18-1080x720-avif.avif".
/var/www/html/wp-content/plugins/performance/plugins/webp-uploads/tests/test-load.php:63

3) Test_WebP_Uploads_Load::test_it_should_remove_the_generated_webp_images_when_the_attachment_is_deleted

Failed asserting that file "/var/www/html/wp-content/uploads/2024/11/leaves-28-1080x720-webp.webp" does not exist.
/var/www/html/wp-content/plugins/performance/vendor/yoast/phpunit-polyfills/src/Polyfills/AssertionRenames.php:113
/var/www/html/wp-content/plugins/performance/plugins/webp-uploads/tests/test-load.php:343

4) Test_WebP_Uploads_Load::test_it_should_remove_the_attached_webp_version_if_the_attachment_is_force_deleted

Failed asserting that file "/var/www/html/wp-content/uploads/2024/11/leaves-28-1080x720-webp.webp" does not exist.
/var/www/html/wp-content/plugins/performance/vendor/yoast/phpunit-polyfills/src/Polyfills/AssertionRenames.php:113
/var/www/html/wp-content/plugins/performance/plugins/webp-uploads/tests/test-load.php:368

5) Test_WebP_Uploads_Load::test_it_should_remove_full_size_images_when_no_size_image_exists

Failed asserting that file "/var/www/html/wp-content/uploads/2024/11/leaves-28-1080x720-webp.webp" does not exist.
/var/www/html/wp-content/plugins/performance/vendor/yoast/phpunit-polyfills/src/Polyfills/AssertionRenames.php:113
/var/www/html/wp-content/plugins/performance/plugins/webp-uploads/tests/test-load.php:391

The issue is in the core, it change the metadata for file key and our plugin use that key. Check WordPress/wordpress-develop#7733 (comment) for more details.

Copy link

github-actions bot commented Nov 6, 2024

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: mukeshpanchal27 <[email protected]>
Co-authored-by: azaozz <[email protected]>
Co-authored-by: westonruter <[email protected]>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) skip changelog PRs that should not be mentioned in changelogs [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests for Modern Image Formats are failing on WP trunk
1 participant