Caspar Template
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
import { graphicPage, prepareEmbedHtml } from "../src/templates.js";
|
||||
import { casparTemplatePage, graphicPage, prepareEmbedHtml } from "../src/templates.js";
|
||||
|
||||
test("adds autoplay parameters and permissions to iframe embeds", () => {
|
||||
const html = prepareEmbedHtml('<iframe src="https://player.example.com/video?id=1"></iframe>');
|
||||
@@ -184,3 +184,11 @@ test("omits autoplay assist when autoplay is disabled", () => {
|
||||
|
||||
assert.doesNotMatch(page, /const playVideo = \(video\) =>/);
|
||||
});
|
||||
|
||||
test("renders a CasparCG template shell", () => {
|
||||
const page = casparTemplatePage();
|
||||
|
||||
assert.match(page, /<body class="graphic transparent is-loading"/);
|
||||
assert.match(page, /<section class="embed provider-empty"/);
|
||||
assert.match(page, /<script src="\/caspar\.js"><\/script>/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user