landing-overview-video.test.mjs
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠ breaking
1 day 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
2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠
1 day ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6
docs: accept Calendar Events v0 spec with Phase 0 security …
Human
1 day ago