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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/13361-the-platform-inventory-page-has-one-prim → main 0 commits fork

  • Merged. scout/13361-the-platform-inventory-page-has-one-prim was merged into main as 721a707.

Review

Sign in to review this change.
2 files changed +7 −1
src/web/pages/inventory.ts +1 −1
@@ -88,7 +88,7 @@ export async function inventoryPage(ctx: Ctx): Promise<Response> {
8888 : html`<p class="muted small mb" id="inventory-unreachable">
8989 Could not reach ${unreachable.join(", ")}.
9090 </p>`}
91 <ul class="list" id="inventory">${items.map(inventoryRow)}</ul>`;
91 <ul class="list setting-list" id="inventory">${items.map(inventoryRow)}</ul>`;
9292 const response = page({ ctx, title: "Inventory", body });
9393 notePhase(ctx.request, "render", performance.now() - rendering);
9494 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
135135 expect((await fetch(`${servers.url}/migrate/inventory?origin=nope`, { headers: { authorization: auth } })).status).toBe(404);
136136 });
137137
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
138144 test("the migrate page links to the inventory once an account is connected", async () => {
139145 const res = await fetch(`${servers.url}/migrate`, { headers: { authorization: auth } });
140146 expect(await res.text()).toContain('href="/migrate/inventory"');

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs