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). */