From 78389c6b6bef6a904d948702465461bbcfea4229 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:59:11 +0000 Subject: [PATCH 1/2] Initial plan From 15db34f1f88e21d574707aad7baebb10b443e6f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:00:44 +0000 Subject: [PATCH 2/2] Add test cases for image/jpg, image/bmp, and image/tiff MIME types Co-authored-by: kat3samsin <2224344+kat3samsin@users.noreply.github.com> --- .../image-studio/Image_Studio_Test.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php b/projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php index d27058d048a..62d3b1d7523 100644 --- a/projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php +++ b/projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php @@ -1476,6 +1476,39 @@ public function test_row_action_added_for_webp() { $this->assertArrayHasKey( 'edit-with-ai', $actions ); } + /** + * Test row action is added for supported JPG image. + */ + public function test_row_action_added_for_jpg() { + wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); + $post = $this->create_attachment_post( 'image/jpg' ); + $actions = ImageStudio\add_image_studio_row_action( array( 'edit' => 'Edit' ), $post ); + + $this->assertArrayHasKey( 'edit-with-ai', $actions ); + } + + /** + * Test row action is added for supported BMP image. + */ + public function test_row_action_added_for_bmp() { + wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); + $post = $this->create_attachment_post( 'image/bmp' ); + $actions = ImageStudio\add_image_studio_row_action( array( 'edit' => 'Edit' ), $post ); + + $this->assertArrayHasKey( 'edit-with-ai', $actions ); + } + + /** + * Test row action is added for supported TIFF image. + */ + public function test_row_action_added_for_tiff() { + wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); + $post = $this->create_attachment_post( 'image/tiff' ); + $actions = ImageStudio\add_image_studio_row_action( array( 'edit' => 'Edit' ), $post ); + + $this->assertArrayHasKey( 'edit-with-ai', $actions ); + } + /** * Test row action is NOT added for unsupported MIME type (PDF). */