File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 () {
You can’t perform that action at this time.
0 commit comments