mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 14:27:26 +00:00
fix(registry): remove invalid editorial video placeholder
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { lintHyperframeHtml } from "../hyperframeLinter.js";
|
||||
|
||||
describe("media rules", () => {
|
||||
it("keeps the editorial emphasis registry component free of invalid placeholder media", async () => {
|
||||
const component = readFileSync(
|
||||
resolve(
|
||||
process.cwd(),
|
||||
"../../registry/components/caption-editorial-emphasis/caption-editorial-emphasis.html",
|
||||
),
|
||||
"utf8",
|
||||
);
|
||||
|
||||
const result = await lintHyperframeHtml(component);
|
||||
|
||||
expect(result.findings.find((finding) => finding.code === "media_missing_src")).toBeUndefined();
|
||||
});
|
||||
|
||||
it("reports error for duplicate media ids", async () => {
|
||||
const html = `
|
||||
<html><body>
|
||||
|
||||
-20
@@ -37,15 +37,6 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#bg-video {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.caption-layer {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -132,17 +123,6 @@
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
>
|
||||
<video
|
||||
id="bg-video"
|
||||
muted
|
||||
playsinline
|
||||
preload="auto"
|
||||
data-start="0"
|
||||
data-duration="8"
|
||||
data-track-index="0"
|
||||
data-has-audio="false"
|
||||
></video>
|
||||
|
||||
<div class="caption-layer" aria-hidden="true">
|
||||
<div id="caption-stage" class="safe-zone"></div>
|
||||
</div>
|
||||
|
||||
@@ -36,15 +36,6 @@
|
||||
background: #000;
|
||||
}
|
||||
|
||||
#bg-video {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.caption-layer {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -130,17 +121,6 @@
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
>
|
||||
<video
|
||||
id="bg-video"
|
||||
muted
|
||||
playsinline
|
||||
preload="auto"
|
||||
data-start="0"
|
||||
data-duration="8"
|
||||
data-track-index="0"
|
||||
data-has-audio="false"
|
||||
></video>
|
||||
|
||||
<div class="caption-layer" aria-hidden="true">
|
||||
<div id="caption-stage" class="safe-zone"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user