test(producer): add regression test for sub-composition inner root class preservation

Adds a minimal composition with a .scene_1-root class wrapper that
exercises the flattenInnerRoot path. Without the fix, the class would be
stripped and CSS selectors would not resolve, rendering a black frame.
This commit is contained in:
Miguel Ángel
2026-06-11 07:13:43 +00:00
parent 72e7957085
commit a2eb0302a7
4 changed files with 387 additions and 0 deletions
@@ -0,0 +1,12 @@
{
"name": "Sub-composition inner root class preservation",
"description": "Verifies that classes on a sub-composition inner root element (e.g. .scene_1-root) survive the producer flatten step so scoped CSS selectors resolve correctly.",
"tags": ["sub-composition", "regression", "flatten"],
"minPsnr": 25,
"maxFrameFailures": 5,
"minAudioCorrelation": 0.0,
"maxAudioLagWindows": 120,
"renderConfig": {
"fps": 24
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fd1b1bfcf1a605b117e5f14f0cd5123e92a0512b6d4f825fd3512a763b2dfe5
size 45117
@@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
html, body { margin: 0; padding: 0; background: #000; }
</style>
</head>
<body>
<div
data-composition-id="main"
data-width="1920"
data-height="1080"
data-duration="2"
style="position:relative; width:1920px; height:1080px; overflow:hidden;"
>
<div
data-composition-id="scene_1"
data-composition-src="compositions/scene_1.html"
data-start="0"
data-duration="2"
data-track-index="0"
style="position:absolute; inset:0;"
></div>
</div>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.7/dist/gsap.min.js"></script>
<script>
window.__timelines = window.__timelines || {};
window.__timelines["main"] = gsap.timeline({ paused: true });
</script>
</body>
</html>