feat: add admin pricing workflow
Quality / test (push) Canceled after 0s

Add the admin pricing observation and valuation form, secure valuation writes with CSRF, and extend authenticated browser coverage.
This commit is contained in:
2026-09-09 01:15:30 -04:00
parent 721b590a89
commit ba88814af0
5 changed files with 71 additions and 1 deletions
@@ -43,6 +43,11 @@ test('signs in and publishes a listing after adding an inventory image', async (
await page.getByLabel('Tax (cents)').fill('50');
await page.getByRole('button', { name: 'Record acquisition' }).click();
await expect(page.locator('section[aria-labelledby="acquisitions-title"] li').first()).toContainText('Basis $11.50');
await page.locator('#pricing-inventory').selectOption(createdInventoryId);
await page.getByLabel('Source identifier').fill('browser-price-1');
await page.getByLabel('Observed price (cents)').fill('2500');
await page.getByRole('button', { name: 'Add observation and calculate' }).click();
await expect(page.getByRole('list', { name: 'Market valuations' })).toContainText('Market value $25.00');
await inventoryLink.click();
await expect(page).toHaveURL(/\/admin\/inventory\/[^/]+\/images$/);
await expect(page.getByRole('heading', { name: 'Manage images' })).toBeVisible();