feat: extract dedicated admin inventory management screen
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 06:46:11 -04:00
parent 934aad2afd
commit c85693c919
12 changed files with 249 additions and 181 deletions
@@ -182,3 +182,38 @@ test("lists jobs and retries a failed job with CSRF protection", async (testCont
assert.equal(retryResponse.statusCode, 202);
assert.equal(csrfChecks, 1);
});
test("lists seller-scoped latest market valuations", async (testContext) => {
const app = buildApp({
authenticateAdmin: async () => ({ sellerId: "seller-1" }),
pricingService: {
async listValuations({ sellerId }) {
assert.equal(sellerId, "seller-1");
return [
{
id: "valuation-1",
inventoryItemId: "item-1",
valueMinor: 2500,
currency: "USD",
strategy: "MEDIAN",
confidence: "MEDIUM",
sourceCount: 2,
calculatedAt: new Date().toISOString(),
},
];
},
},
});
testContext.after(() => app.close());
const response = await app.inject({
method: "GET",
url: "/api/v1/admin/valuations",
});
assert.equal(response.statusCode, 200);
const [valuation] = response.json().data;
assert.equal(valuation.inventoryItemId, "item-1");
assert.equal(valuation.valueMinor, 2500);
assert.equal(valuation.stale, false);
});