Add the admin pricing observation and valuation form, secure valuation writes with CSRF, and extend authenticated browser coverage.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user