Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI/Player: 43176, fix tests/attributes #8705

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading