Skip to content

Commit

Permalink
UI/Player: 43176, fix tests/attributes (ILIAS-eLearning#8705)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaagen authored Dec 23, 2024
1 parent 3b8f7ef commit 4c95c9d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="il-audio-container">
<audio controls="true" class="il-audio-player" id="{ID}" src="{SOURCE}" preload="metadata"></audio>
<audio controls class="il-audio-player" id="{ID}" src="{SOURCE}" preload="metadata"></audio>
<!-- BEGIN transcription -->
{BUTTON_AND_MODAL}
<!-- END transcription -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="il-video-container">
<video controls="true" class="il-video-player" id="{ID}" src="{SOURCE}" style="max-width: 100%;" preload="metadata" <!-- BEGIN poster -->poster="{POSTER_SOURCE}"<!-- END poster -->>
<video controls class="il-video-player" id="{ID}" src="{SOURCE}" style="max-width: 100%;" preload="metadata" <!-- BEGIN poster -->poster="{POSTER_SOURCE}"<!-- END poster -->>
<!-- BEGIN track --><track kind="subtitles" src="{TRACK_SOURCE}" srclang="{TRACK_LANG}" /><!-- END track -->
</video>
</div>
4 changes: 2 additions & 2 deletions components/ILIAS/UI/tests/Component/Item/ItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,11 @@ public function testRenderAudioPlayer(): void
<div class="il-item il-std-item ">
<h4 class="il-item-title">title</h4>
<div class="il-item-audio"><div class="il-audio-container">
<audio controls="true" class="il-audio-player" id="id_1" src="src" preload="metadata"/>
<audio controls class="il-audio-player" id="id_1" src="src" preload="metadata"></audio>
</div></div>
</div>
EOT;
$this->assertHTMLEquals(
$this->assertEquals(
$this->brutallyTrimHTML($expected),
$this->brutallyTrimHTML($html)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ public function testRenderAudio(): void

$expected = <<<EOT
<div class="il-audio-container">
<audio controls="true" class="il-audio-player" id="id_1" src="/foo" preload="metadata" />
<audio controls class="il-audio-player" id="id_1" src="/foo" preload="metadata"></audio>
</div>
EOT;
$this->assertHTMLEquals(
$this->assertEquals(
$this->brutallyTrimHTML($expected),
$this->brutallyTrimHTML($html)
);
Expand Down
12 changes: 6 additions & 6 deletions components/ILIAS/UI/tests/Component/Player/PlayerVideoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ public function testRenderVideo(): void
$html = $r->render($video);
$expected = <<<EOT
<div class="il-video-container">
<video controls="true" class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" >
<video controls class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" >
</video>
</div>
EOT;
$this->assertHTMLEquals(
$this->assertEquals(
$this->brutallyTrimHTML($expected),
$this->brutallyTrimHTML($html)
);
Expand All @@ -129,11 +129,11 @@ public function testRenderWithPoster(): void

$expected = <<<EOT
<div class="il-video-container">
<video controls="true" class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" poster="bar.jpg">
<video controls class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" poster="bar.jpg">
</video>
</div>
EOT;
$this->assertHTMLEquals(
$this->assertEquals(
$this->brutallyTrimHTML($expected),
$this->brutallyTrimHTML($html)
);
Expand All @@ -149,12 +149,12 @@ public function testRenderWithSubtitles(): void
$html = $r->render($video);
$expected = <<<EOT
<div class="il-video-container">
<video controls="true" class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" >
<video controls class="il-video-player" id="id_1" src="/foo" style="max-width: 100%;" preload="metadata" >
<track kind="subtitles" src="subtitles.vtt" srclang="en" />
</video>
</div>
EOT;
$this->assertHTMLEquals(
$this->assertEquals(
$this->brutallyTrimHTML($expected),
$this->brutallyTrimHTML($html)
);
Expand Down

0 comments on commit 4c95c9d

Please sign in to comment.