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
+15
View File
@@ -171,4 +171,19 @@ test('creates an admin saved view through the CSRF-protected API', async () => {
} finally {
globalThis.fetch = originalFetch;
}
});
test('lists seller-scoped latest market valuations', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url) => {
assert.equal(url, '/api/v1/admin/valuations');
return { ok: true, async json() { return { data: [{ id: 'valuation-1', inventoryItemId: 'item-1', valueMinor: 2500 }] }; } };
};
try {
const { listAdminValuations } = await import('../src/services/admin-pricing-service.js');
assert.deepEqual(await listAdminValuations(), [{ id: 'valuation-1', inventoryItemId: 'item-1', valueMinor: 2500 }]);
} finally {
globalThis.fetch = originalFetch;
}
});