Skip to content

Commit

Permalink
After comparing with Gutenberg trunk, this test condition needed to b…
Browse files Browse the repository at this point in the history
…e synced background-size: contain;background-attachment: fixed;
  • Loading branch information
ramonjd committed Aug 26, 2024
1 parent 968e4ef commit 03bf346
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/phpunit/tests/theme/wpThemeJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -5156,6 +5156,7 @@ public function test_get_top_level_background_image_styles() {
'styles' => array(
'background' => array(
'backgroundImage' => "url('http://example.org/image.png')",
'backgroundSize' => 'contain',
'backgroundRepeat' => 'no-repeat',
'backgroundPosition' => 'center center',
'backgroundAttachment' => 'fixed',
Expand All @@ -5164,7 +5165,7 @@ public function test_get_top_level_background_image_styles() {
)
);

$expected_styles = "html{min-height: calc(100% - var(--wp-admin--admin-bar--height, 0px));}body{background-image: url('http://example.org/image.png');background-position: center center;background-repeat: no-repeat;background-attachment: fixed;}";
$expected_styles = "html{min-height: calc(100% - var(--wp-admin--admin-bar--height, 0px));}body{background-image: url('http://example.org/image.png');background-position: center center;background-repeat: no-repeat;background-size: contain;background-attachment: fixed;}";
$this->assertSame( $expected_styles, $theme_json->get_styles_for_block( $body_node ), 'Styles returned from "::get_stylesheet()" with top-level background image as string type do not match expectations' );
}

Expand Down

0 comments on commit 03bf346

Please sign in to comment.