Public: anyone can read this; the crew can change it.
The platform inventory page has one primary next action and is looked at on phone and desktop widths #16773
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/13361-the-platform-inventory-page-has-one-prim → main 0 commits fork
2 files
changed +7
−1
src/web/pages/inventory.ts +1 −1
| @@ -88,7 +88,7 @@ export async function inventoryPage(ctx: Ctx): Promise<Response> { | ||
| 88 | 88 | : html`<p class="muted small mb" id="inventory-unreachable"> |
| 89 | 89 | Could not reach ${unreachable.join(", ")}. |
| 90 | 90 | </p>`} |
| 91 | <ul class="list" id="inventory">${items.map(inventoryRow)}</ul>`; | |
| 91 | <ul class="list setting-list" id="inventory">${items.map(inventoryRow)}</ul>`; | |
| 92 | 92 | const response = page({ ctx, title: "Inventory", body }); |
| 93 | 93 | notePhase(ctx.request, "render", performance.now() - rendering); |
| 94 | 94 | return response; |
test/origin-inventory.test.ts +6
| @@ -135,6 +135,12 @@ test("the page lists three apps and one primary next action, with no secret valu | ||
| 135 | 135 | expect((await fetch(`${servers.url}/migrate/inventory?origin=nope`, { headers: { authorization: auth } })).status).toBe(404); |
| 136 | 136 | }); |
| 137 | 137 | |
| 138 | test("the page has exactly one primary action, and rows wrap their actions at phone width", async () => { | |
| 139 | const body = await (await fetch(`${servers.url}/migrate/inventory`, { headers: { authorization: auth } })).text(); | |
| 140 | expect(body.match(/data-variant="primary"/g)?.length ?? 0).toBe(1); | |
| 141 | expect(body).toContain('class="list setting-list" id="inventory"'); | |
| 142 | }); | |
| 143 | ||
| 138 | 144 | test("the migrate page links to the inventory once an account is connected", async () => { |
| 139 | 145 | const res = await fetch(`${servers.url}/migrate`, { headers: { authorization: auth } }); |
| 140 | 146 | expect(await res.text()).toContain('href="/migrate/inventory"'); |
new above
offline