feat: the videos panel in the Site tab, captions optional (front 8.4)

Dropstar uploads the six videos themselves, so the panel moves from
Integrações to the Site tab, next to products and prices. A video can be
published without a VTT: the Site plays it without a captions track.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-09 14:50:18 -03:00
parent 2a6732eb37
commit 2f85a38562
6 changed files with 75 additions and 58 deletions

View File

@@ -165,7 +165,7 @@ try{
await waitFor(()=>kanban.eval('!document.getElementById("app").hidden'),'Kanban sign-in');
assert.equal(await kanban.eval('sessionStorage.getItem("dtf-operator")'),null);
assert.equal(await kanban.eval('document.getElementById("password").value'),'');
await kanban.click('[data-tab="integrations"]');
await kanban.click('[data-tab="site"]');
await waitFor(()=>kanban.eval('document.querySelectorAll("#site-videos-list .siteVideoRow").length===6'),
'six video slots in Gestão');
assert.equal(await kanban.eval('document.querySelectorAll("#site-videos-list input[type=file]").length'),12);

View File

@@ -56,7 +56,22 @@ def run():
operator.call('/operator/site-videos/sala', {'upload_id': video,
'captions_id': captions, 'product': 'file', 'enabled': False})
assert not any(row['id'] == 'sala' for row in client.call('/site/videos')['videos'])
print('PASS: Gestão publishes a scanned video, signed media and same-origin VTT; hiding removes it from the Site')
# Captions are optional (front 8.4): the video alone is published. The
# published VTT copy stops being referenced, so keep it for cleanup.
with db.connect() as c:
old = c.execute("SELECT captions_key FROM dtf_local.site_videos WHERE id='sala'").fetchone()
if old and old['captions_key']:
keys.append(old['captions_key'])
operator.call('/operator/site-videos/sala', {'upload_id': video,
'product': 'file', 'enabled': True})
entry = next(row for row in client.call('/site/videos')['videos'] if row['id'] == 'sala')
assert entry['captions'] is None, entry
client.call('/site/videos/sala/captions', expected=404)
operator.call('/operator/site-videos/sala', {'upload_id': video,
'product': 'file', 'enabled': False})
assert not any(row['id'] == 'sala' for row in client.call('/site/videos')['videos'])
print('PASS: Gestão publishes a scanned video with signed media, with or without captions;'
' hiding removes it from the Site')
finally:
with db.connect() as c:
row = c.execute("DELETE FROM dtf_local.site_videos WHERE id='sala' RETURNING video_key,captions_key").fetchone()