landing-band-b.test.mjs
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf
mirror: GitHub Phase A durable MCP OAuth (#270)
Human
minor
⚠ breaking
10 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 | const hubPath = 'href="/hub/"'; |
| 11 | const selfHostAnchor = |
| 12 | 'href="https://github.com/aaronrene/knowtation/blob/main/docs/TWO-PATHS-HOSTED-AND-SELF-HOSTED.md#quick-start-self-hosted"'; |
| 13 | const aiAssistedSetup = |
| 14 | 'href="https://github.com/aaronrene/knowtation/blob/main/docs/AI-ASSISTED-SETUP.md"'; |
| 15 | |
| 16 | describe('landing Band B (Phase 2 easy start)', () => { |
| 17 | it('places Band B after the GitHub badge and before deploy headlines', () => { |
| 18 | const badge = indexHtml.indexOf('class="badge-wrap"'); |
| 19 | const bandB = indexHtml.indexOf('class="band-b-path wide"'); |
| 20 | const deploy = indexHtml.indexOf('class="deploy-headlines wide"'); |
| 21 | assert.ok(badge !== -1 && bandB !== -1 && deploy !== -1); |
| 22 | assert.ok(badge < bandB && bandB < deploy); |
| 23 | }); |
| 24 | |
| 25 | it('includes hero-equivalent Hub and self-host quick start links inside Band B', () => { |
| 26 | const bandB = indexHtml.indexOf('class="band-b-path wide"'); |
| 27 | const deploy = indexHtml.indexOf('class="deploy-headlines wide"'); |
| 28 | const slice = indexHtml.slice(bandB, deploy); |
| 29 | const hubInBand = slice.indexOf(hubPath); |
| 30 | const selfHostInBand = slice.indexOf(selfHostAnchor); |
| 31 | const aiSetupInBand = slice.indexOf(aiAssistedSetup); |
| 32 | assert.ok(hubInBand !== -1, 'Hosted Hub link missing in Band B'); |
| 33 | assert.ok(selfHostInBand !== -1, 'Self-host quick start link missing in Band B'); |
| 34 | assert.ok(aiSetupInBand !== -1, 'AI-assisted setup link missing in Band B'); |
| 35 | assert.ok( |
| 36 | hubInBand < selfHostInBand, |
| 37 | 'Hosted Hub should appear before self-host quick start in Band B' |
| 38 | ); |
| 39 | }); |
| 40 | |
| 41 | it('exposes section landmark, number beside title, and three step titles', () => { |
| 42 | assert.match( |
| 43 | indexHtml, |
| 44 | /class="band-b-path wide" aria-label="Three steps: note or import, add agents, ask your AI"/ |
| 45 | ); |
| 46 | assert.match(indexHtml, /class="band-b-step-head"/); |
| 47 | assert.match(indexHtml, /class="band-b-step-title">Note \/ import</); |
| 48 | assert.match(indexHtml, /class="band-b-step-title">Add agents</); |
| 49 | assert.match(indexHtml, /class="band-b-step-title">Ask your AI</); |
| 50 | assert.match(indexHtml, /\.band-b-step-marker\s*\{[^}]*font-size:\s*clamp\(/s); |
| 51 | }); |
| 52 | |
| 53 | it('meta description mentions proposals and human approval', () => { |
| 54 | assert.match( |
| 55 | indexHtml, |
| 56 | /<meta name="description" content="[^"]*proposals need human approval[^"]*">/ |
| 57 | ); |
| 58 | }); |
| 59 | }); |
File History
4 commits
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf
mirror: GitHub Phase A durable MCP OAuth (#270)
Human
minor
⚠
10 days ago
sha256:d8c648b20a4d53b2673c5c082ee7edfa7b2fc9b11080832da1f38807b6bf940b
fix(7C-L1b): route hosted delegation proposals through cani…
Human
minor
⚠
30 days ago
sha256:2827ba9e7632a4b141c50caf1e8f7d77abbc3515be20e7465f2bccb0ac4edf91
fix: repair endpoint now sets has_active_subscription when …
Human
minor
⚠
49 days ago
sha256:6a102aafafdfe7e70a24f4e59740200f0ee713ce7915f1b53e9d4ba5ee8b4410
Initial Muse snapshot
Human
82 days ago