Skip to content

Commit e4f76fc

Browse files
Compression rates are all over the place :|
1 parent e861cfb commit e4f76fc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/integration/BulkOptimizationIntegrationTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ public function test_summary_should_display_accurate_values() {
2626
$this->assertEquals( '3', $this->find( '#uploaded-images' )->getText() );
2727
$this->assertEquals( '5', $this->find( '#optimizable-image-sizes' )->getText() );
2828
$this->assertEquals( '$ 0.00', $this->find( '#estimated-cost' )->getText() );
29-
$this->assertEquals( '24.4%', $this->find( '#savings-percentage' )->getText() );
3029
$this->assertEquals( '4', $this->find( '#optimized-image-sizes' )->getText() );
31-
$this->assertEquals( '2.82 MB', $this->find( '#unoptimized-library-size' )->getText() );
32-
$this->assertEquals( '2.13 MB', $this->find( '#optimized-library-size' )->getText() );
30+
31+
$this->assertRegExp( '/[23](\.\d+)? MB/', $this->find( '#unoptimized-library-size' )->getText() );
32+
$this->assertRegExp( '/[12](\.\d+)? MB/', $this->find( '#optimized-library-size' )->getText() );
33+
$this->assertRegExp( '/2\d(\.\d+)?%/', $this->find( '#savings-percentage' )->getText() );
3334
}
3435

3536
public function test_start_bulk_optimization_should_optimize_remaining_images() {

0 commit comments

Comments
 (0)