Public: anyone can read this; the crew can change it.
A test holds Settings › Accounts to the home page's language: no card, one settings-block #9948
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/9928-a-test-holds-settings-accounts-to-the-ho → main 1 commit fork
1 file
changed +10
−0
test/accounts-language.test.ts +10
| @@ -46,6 +46,16 @@ test("a person's sign-ins page is blocks all the way down, no card", async () => | ||
| 46 | 46 | expect((m.match(/class="settings-block"/g) ?? []).length).toBeGreaterThanOrEqual(4); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | test("the accounts list is a settings-block under an h2, rows in .list, no card", async () => { | |
| 50 | const m = main(await (await fetch(`${servers.url}/settings/accounts`, { headers: { cookie: admin } })).text()); | |
| 51 | expect(m).not.toContain('class="card'); | |
| 52 | expect(m).toMatch(/<section class="settings-block" id="accounts">\s*<h2>Who is on this forge<\/h2>/); | |
| 53 | const list = m.slice(m.indexOf('id="accounts-list"')); | |
| 54 | expect(m).toMatch(/<ul class="list[^"]*" id="accounts-list">/); | |
| 55 | expect(list).toContain("bobby"); | |
| 56 | expect(list).toContain("alice"); | |
| 57 | }); | |
| 58 | ||
| 49 | 59 | test("the accounts list keeps its confirm links", async () => { |
| 50 | 60 | const m = main(await (await fetch(`${servers.url}/settings/accounts`, { headers: { cookie: admin } })).text()); |
| 51 | 61 | expect(m).toContain("/-/confirm?to=%2Fsettings%2Faccounts%2Fbobby%2Fsuspend"); |