Skip to content

Commit fb3428f

Browse files
Fixed test integration test_should_show_widget_with_some_images_optimized.
1 parent 1f0ead3 commit fb3428f

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

test/integration/DashboardWidgetIntegrationTest.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@ public function test_should_show_widget_with_some_images_optimized() {
4848
$element = $this->find(
4949
'#tinypng_dashboard_widget #widget-half-optimized p'
5050
);
51-
52-
$this->assertEquals(
53-
'Admin, you are doing good. With your current settings you can still optimize 5 image sizes from your 2 uploaded JPEG and PNG images. Start the bulk optimization to optimize the remainder of your library.',
54-
$element->getText()
55-
);
51+
if ( $this->has_medium_large_size() ) {
52+
$this->assertEquals(
53+
'Admin, you are doing good. With your current settings you can still optimize 5 image sizes from your 2 uploaded JPEG and PNG images. Start the bulk optimization to optimize the remainder of your library.',
54+
$element->getText()
55+
);
56+
} else {
57+
$this->assertEquals(
58+
'Admin, you are doing good. With your current settings you can still optimize 4 image sizes from your 2 uploaded JPEG and PNG images. Start the bulk optimization to optimize the remainder of your library.',
59+
$element->getText()
60+
);
61+
}
5662
}
5763

5864
public function test_should_show_widget_with_all_images_optimized() {

0 commit comments

Comments
 (0)