Skip to content

Commit 5ba19f4

Browse files
committed
Add test for existing style manipulation
1 parent b164f84 commit 5ba19f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/embed-optimizer/tests/test-cases/nested-figure-embed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ static function ( OD_Tag_Visitor_Context $context ) use ( $test_case ): bool {
7474
<title>...</title>
7575
</head>
7676
<body>
77-
<figure class="wp-block-embed is-type-video">
77+
<figure style="background: black; color:gray" class="wp-block-embed is-type-video">
7878
<div class="wp-block-embed__wrapper">
7979
<video src="https://example.com/video1.mp4" poster="https://example.com/poster1.jpg" width="640" height="480"></video>
8080
</div>
8181
</figure>
82-
<figure class="wp-block-embed is-type-rich is-provider-figurine wp-block-embed-figurine">
82+
<figure style="background: black; color: white;" class="wp-block-embed is-type-rich is-provider-figurine wp-block-embed-figurine">
8383
<div class="wp-block-embed__wrapper">
8484
<figure>
8585
<p>So I heard you like <code>FIGURE</code>?</p>
@@ -101,12 +101,12 @@ static function ( OD_Tag_Visitor_Context $context ) use ( $test_case ): bool {
101101
<link data-od-added-tag rel="preload" as="image" href="https://example.com/poster1.jpg">
102102
</head>
103103
<body>
104-
<figure data-od-added-style style="min-height: 500px;" class="wp-block-embed is-type-video">
104+
<figure data-od-replaced-style="background: black; color:gray" style="background: black; color:gray; min-height: 500px;" class="wp-block-embed is-type-video">
105105
<div data-od-xpath="/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]/*[1][self::DIV]" class="wp-block-embed__wrapper">
106106
<video data-od-added-preload data-od-xpath="/*[1][self::HTML]/*[2][self::BODY]/*[1][self::FIGURE]/*[1][self::DIV]/*[1][self::VIDEO]" preload="auto" src="https://example.com/video1.mp4" poster="https://example.com/poster1.jpg" width="640" height="480"></video>
107107
</div>
108108
</figure>
109-
<figure data-od-added-style style="min-height: 500px;" class="wp-block-embed is-type-rich is-provider-figurine wp-block-embed-figurine">
109+
<figure data-od-replaced-style="background: black; color: white;" style="background: black; color: white; min-height: 500px;" class="wp-block-embed is-type-rich is-provider-figurine wp-block-embed-figurine">
110110
<div data-od-xpath="/*[1][self::HTML]/*[2][self::BODY]/*[2][self::FIGURE]/*[1][self::DIV]" class="wp-block-embed__wrapper">
111111
<figure>
112112
<p>So I heard you like <code>FIGURE</code>?</p>

0 commit comments

Comments
 (0)