Skip to content

Commit

Permalink
Remove clamp values from tests as they can be dynamic after new WP re…
Browse files Browse the repository at this point in the history
…leases
  • Loading branch information
thelovekesh committed Jul 7, 2023
1 parent 14e58fb commit d00a239
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/php/src/ReaderThemeSupportFeaturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,16 +483,15 @@ public function test_print_theme_support_styles_reader( $is_legacy ) {
$this->assertStringContainsString( '<style id="amp-wp-theme-support-editor-font-sizes">', $output );
$this->assertStringContainsString( 'font-size: clamp(', $output );
$this->assertStringContainsString( '+ ((', $output );
$this->assertStringContainsString( ':root .has-small-font-size { font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.48rem) * 0.24), 1rem); }', $output );
$this->assertStringContainsString( ':root .has-small-font-size { font-size: clamp(0.875rem', $output );
}

// Assert spacing size custom properties.
if ( $this->call_private_method( $this->instance, 'theme_has_theme_json' ) && function_exists( 'wp_get_global_settings' ) ) {
$this->assertStringContainsString( '<style id="amp-wp-theme-support-spacing-sizes-custom-properties">', $output );
$this->assertStringContainsString( ':root {', $output );
$this->assertStringContainsString( '--wp--preset--spacing--30: clamp(1.5rem, 5vw, 2rem);', $output );
$this->assertStringContainsString( 'clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem);', $output );
$this->assertStringContainsString( '--wp--preset--spacing--80: clamp(7rem, 14vw, 11rem);', $output );
$this->assertStringContainsString( '--wp--preset--spacing--30:', $output );
$this->assertStringContainsString( '--wp--preset--spacing--80:', $output );
$this->assertStringContainsString( '}', $output );
$this->assertStringContainsString( '</style>', $output );
}
Expand Down

0 comments on commit d00a239

Please sign in to comment.