landing-footer.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, existsSync } 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 | const hubHtml = readFileSync(join(root, 'web', 'hub', 'index.html'), 'utf8'); |
| 10 | |
| 11 | describe('landing footer and favicon', () => { |
| 12 | it('links Discord community invite above tagline', () => { |
| 13 | const discordIdx = indexHtml.indexOf('https://discord.gg/NrtzhZtrED'); |
| 14 | const taglineIdx = indexHtml.indexOf('Your notes, your data, your context.'); |
| 15 | assert.ok(discordIdx !== -1 && taglineIdx !== -1 && discordIdx < taglineIdx); |
| 16 | assert.match(indexHtml, /<strong>Join the community<\/strong>/); |
| 17 | assert.match(indexHtml, /class="footer-discord-link"/); |
| 18 | }); |
| 19 | |
| 20 | it('uses PNG favicon on landing and hub', () => { |
| 21 | assert.ok(indexHtml.includes('href="/assets/favicon.png"')); |
| 22 | assert.ok(hubHtml.includes('href="/assets/favicon.png"')); |
| 23 | assert.ok(existsSync(join(root, 'web', 'assets', 'favicon.png'))); |
| 24 | }); |
| 25 | |
| 26 | it('includes YouTube and X footer icons before tagline', () => { |
| 27 | const yt = indexHtml.indexOf('https://www.youtube.com/@Knowtation'); |
| 28 | const x = indexHtml.indexOf('https://x.com/Knowtation1111'); |
| 29 | const taglineIdx = indexHtml.indexOf('Your notes, your data, your context.'); |
| 30 | assert.ok(yt !== -1 && yt < taglineIdx); |
| 31 | assert.ok(x !== -1 && x < taglineIdx); |
| 32 | assert.match(indexHtml, /class="footer-social-icons"/); |
| 33 | }); |
| 34 | |
| 35 | it('places Discord, YouTube, and X beside the theme toggle in the header', () => { |
| 36 | assert.match(indexHtml, /class="landing-header-start"/); |
| 37 | assert.match(indexHtml, /class="landing-header-social"/); |
| 38 | const start = indexHtml.indexOf('class="landing-header-start"'); |
| 39 | const themeBtn = indexHtml.indexOf('id="theme-toggle"'); |
| 40 | const social = indexHtml.indexOf('class="landing-header-social"'); |
| 41 | assert.ok(start !== -1 && themeBtn > start && social > themeBtn); |
| 42 | assert.ok(indexHtml.includes('aria-label="Knowtation on YouTube"', indexHtml.indexOf('landing-header-social'))); |
| 43 | }); |
| 44 | }); |
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