FIX: allows youtube embeds to respect the t param (#21295)

This commit is contained in:
Joffrey JAFFEUX
2023-04-28 15:46:27 +02:00
committed by GitHub
parent 36d388b57f
commit 69696843c6
5 changed files with 18 additions and 2 deletions

View File

@ -13,6 +13,7 @@ module("Discourse Lazy Videos | Component | lazy-video", function (hooks) {
providerName: "youtube",
id: "kPRA0W1kECg",
dominantColor: "00ffff",
startTime: 234,
};
test("displays the correct video title", async function (assert) {
@ -21,6 +22,12 @@ module("Discourse Lazy Videos | Component | lazy-video", function (hooks) {
assert.dom(".title-link").hasText(this.attributes.title);
});
test("uses the correct video start time", async function (assert) {
await render(hbs`<LazyVideo @videoAttributes={{this.attributes}} />`);
assert.dom(".youtube-onebox").hasAttribute("data-video-start-time", "234");
});
test("displays the correct provider icon", async function (assert) {
await render(hbs`<LazyVideo @videoAttributes={{this.attributes}} />`);