From 89707d0e55a4cbb4be6c1b3a3ed23d9193beb4a6 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Wed, 25 Oct 2023 00:11:05 +0530 Subject: [PATCH] Add test cases for auto ssr img with high fetchpriority in `OptimizeHeroImages::generateImg()` --- .../Transformer/OptimizeHeroImagesTest.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/Optimizer/Transformer/OptimizeHeroImagesTest.php b/tests/Optimizer/Transformer/OptimizeHeroImagesTest.php index f7fdd9564..ed01ba6e6 100644 --- a/tests/Optimizer/Transformer/OptimizeHeroImagesTest.php +++ b/tests/Optimizer/Transformer/OptimizeHeroImagesTest.php @@ -342,7 +342,7 @@ public function dataTransform() ), ], - 'preserves fetchpriority attribute from noscript fallback img on prerendered image' => [ + 'preserves fetchpriority attribute from noscript fallback img' => [ $input( '' ), @@ -350,6 +350,19 @@ public function dataTransform() '' ), ], + + 'automatically ssr img element with high fetchpriority attribute from noscript fallback img' => [ + $input( + '' + . '' + . '' + ), + $output( + '' + . '' + . '' + ), + ], ]; }