test: complete authenticated admin workflow
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-08 23:07:23 -04:00
parent ba221d57c5
commit cf6291041d
2 changed files with 4 additions and 4 deletions
@@ -11,6 +11,6 @@ export async function registerAdminLookupRoutes(app, options) {
} }
}); });
app.get('/lookups/categories', async () => ({ data: catalogLookupRepository.listCategories() })); app.get('/lookups/categories', async () => ({ data: await catalogLookupRepository.listCategories() }));
app.get('/lookups/conditions', async () => ({ data: catalogLookupRepository.listConditions() })); app.get('/lookups/conditions', async () => ({ data: await catalogLookupRepository.listConditions() }));
} }
@@ -20,8 +20,8 @@ test('signs in and creates a product and physical copy from the admin workspace'
await page.getByRole('button', { name: 'Create product' }).click(); await page.getByRole('button', { name: 'Create product' }).click();
await expect(page.locator('#inventory-product option').nth(1)).toBeAttached(); await expect(page.locator('#inventory-product option').nth(1)).toBeAttached();
await page.getByLabel('Product').selectOption({ index: 1 }); await page.getByLabel('Product', { exact: true }).selectOption({ index: 1 });
await page.getByLabel('Condition').selectOption({ index: 1 }); await page.getByLabel('Condition', { exact: true }).selectOption({ index: 1 });
await page.getByRole('button', { name: 'Create copy' }).click(); await page.getByRole('button', { name: 'Create copy' }).click();
await expect(page.getByText('Manage images')).toBeVisible(); await expect(page.getByText('Manage images')).toBeVisible();