landing-overview-video.test.mjs
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752
feat(auth): durable MCP OAuth refresh via shared strong sto…
Agent
minor
62 days ago
| 1 | import { describe, it } from 'node:test'; |
| 2 | import assert from 'node:assert'; |
| 3 | import { readFileSync } from 'node:fs'; |
| 4 | import { fileURLToPath } from 'node:url'; |
| 5 | import { dirname, join } from 'node:path'; |
| 6 | |
| 7 | const root = join(dirname(fileURLToPath(import.meta.url)), '..'); |
| 8 | const indexHtml = readFileSync(join(root, 'web', 'index.html'), 'utf8'); |
| 9 | |
| 10 | describe('landing overview YouTube embed', () => { |
| 11 | it('places the overview section after the deploy headline and before spotlight cards', () => { |
| 12 | const deploy = indexHtml.indexOf('decentralized Internet Computer canisters'); |
| 13 | const videoSec = indexHtml.indexOf('class="landing-overview-video wide"'); |
| 14 | const spotlight = indexHtml.indexOf('class="spotlight-pair wide"'); |
| 15 | assert.ok(deploy !== -1 && videoSec > deploy && spotlight > videoSec); |
| 16 | }); |
| 17 | |
| 18 | it('embeds the overview video without playlist on iframe (avoids embed errors); rel=0 for same-channel suggestions', () => { |
| 19 | assert.ok(indexHtml.includes('youtube.com/embed/LPHBkyZmvVo')); |
| 20 | const embedIdx = indexHtml.indexOf('youtube.com/embed/LPHBkyZmvVo'); |
| 21 | const iframeEnd = indexHtml.indexOf('></iframe>', embedIdx); |
| 22 | const iframeSlice = indexHtml.slice(embedIdx, iframeEnd === -1 ? embedIdx + 400 : iframeEnd); |
| 23 | assert.ok(!iframeSlice.includes('list=UUW-qQC8z_QcBz5QfDi2zapw'), 'playlist on iframe can make player show unavailable'); |
| 24 | assert.ok(indexHtml.includes('rel=0')); |
| 25 | assert.ok(indexHtml.includes('modestbranding=1')); |
| 26 | }); |
| 27 | |
| 28 | it('links the channel strip to the overview watch URL with the same uploads list', () => { |
| 29 | assert.match( |
| 30 | indexHtml, |
| 31 | /href="https:\/\/www\.youtube\.com\/watch\?v=LPHBkyZmvVo[^"]*list=UUW-qQC8z_QcBz5QfDi2zapw"/ |
| 32 | ); |
| 33 | }); |
| 34 | }); |
File History
5 commits
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752
feat(auth): durable MCP OAuth refresh via shared strong sto…
Agent
minor
62 days ago
sha256:873e30b7fafe601346295f8f4289f388f21d8f715f28584d5481899ba2b714fc
Merge pull request #249 from aaronrene/muse-mirror
Agent
79 days ago
sha256:d8c648b20a4d53b2673c5c082ee7edfa7b2fc9b11080832da1f38807b6bf940b
fix(7C-L1b): route hosted delegation proposals through cani…
Human
minor
⚠
81 days ago
sha256:2827ba9e7632a4b141c50caf1e8f7d77abbc3515be20e7465f2bccb0ac4edf91
fix: repair endpoint now sets has_active_subscription when …
Human
minor
⚠
101 days ago
sha256:6a102aafafdfe7e70a24f4e59740200f0ee713ce7915f1b53e9d4ba5ee8b4410
Initial Muse snapshot
Human
134 days ago