Public: anyone can read this; the crew can change it.
The crew's answers under the tell box speak the home page's language #10028
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/9972-the-crew-s-answers-under-the-tell-box-sp → main 2 commits fork
2 files
changed +13
−2
src/web/studio/answers.ts +4 −2
| @@ -106,8 +106,10 @@ export function answersRegion( | ||
| 106 | 106 | > |
| 107 | 107 | ${rows.length === 0 |
| 108 | 108 | ? null |
| 109 | : html`<div class="card"><div class="card-head"><h2>The crew's answers</h2></div> | |
| 110 | <div class="card-body"><ul class="list answers">${rows}</ul></div></div>`} | |
| 109 | : html`<section class="settings-block"> | |
| 110 | <h2>The crew's answers</h2> | |
| 111 | <ul class="list answers">${rows}</ul> | |
| 112 | </section>`} | |
| 111 | 113 | </div>`; |
| 112 | 114 | } |
| 113 | 115 |
test/app-answers.test.ts +9
| @@ -124,6 +124,15 @@ describe("the crew's answer under the tell box", () => { | ||
| 124 | 124 | |
| 125 | 125 | const frag = await (await get(alice, "/alice/notes/app/answers")).text(); |
| 126 | 126 | expect(frag).toContain("Footer added on a branch."); |
| 127 | // The home page's language: rows under a heading, no boxed card. | |
| 128 | for (const body of [page, frag]) { | |
| 129 | const from = body.indexOf('id="live-answers"'); | |
| 130 | const region = body.slice(from, body.indexOf("</section>", from)); | |
| 131 | expect(region).toContain('<section class="settings-block">'); | |
| 132 | expect(region).toMatch(/<h2>The crew('|')s answers<\/h2>/); | |
| 133 | expect(region).not.toContain('class="card'); | |
| 134 | expect(region).not.toContain("card-head"); | |
| 135 | } | |
| 127 | 136 | expect(frag.indexOf("Add a footer.")).toBeLessThan(frag.indexOf("Make the <b>")); |
| 128 | 137 | }); |
| 129 | 138 |