From cf6291041da090593d5b8ad39745b201c5e89a66 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Tue, 8 Sep 2026 23:07:23 -0400 Subject: [PATCH] test: complete authenticated admin workflow --- apps/api/src/modules/inventory/routes/admin-lookup-routes.js | 4 ++-- apps/web/tests/e2e/admin-catalog-workflow.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api/src/modules/inventory/routes/admin-lookup-routes.js b/apps/api/src/modules/inventory/routes/admin-lookup-routes.js index faf52b5..97392be 100644 --- a/apps/api/src/modules/inventory/routes/admin-lookup-routes.js +++ b/apps/api/src/modules/inventory/routes/admin-lookup-routes.js @@ -11,6 +11,6 @@ export async function registerAdminLookupRoutes(app, options) { } }); - app.get('/lookups/categories', async () => ({ data: catalogLookupRepository.listCategories() })); - app.get('/lookups/conditions', async () => ({ data: catalogLookupRepository.listConditions() })); + app.get('/lookups/categories', async () => ({ data: await catalogLookupRepository.listCategories() })); + app.get('/lookups/conditions', async () => ({ data: await catalogLookupRepository.listConditions() })); } \ No newline at end of file diff --git a/apps/web/tests/e2e/admin-catalog-workflow.spec.js b/apps/web/tests/e2e/admin-catalog-workflow.spec.js index 1166ec4..1c9f52a 100644 --- a/apps/web/tests/e2e/admin-catalog-workflow.spec.js +++ b/apps/web/tests/e2e/admin-catalog-workflow.spec.js @@ -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 expect(page.locator('#inventory-product option').nth(1)).toBeAttached(); - await page.getByLabel('Product').selectOption({ index: 1 }); - await page.getByLabel('Condition').selectOption({ index: 1 }); + await page.getByLabel('Product', { exact: true }).selectOption({ index: 1 }); + await page.getByLabel('Condition', { exact: true }).selectOption({ index: 1 }); await page.getByRole('button', { name: 'Create copy' }).click(); await expect(page.getByText('Manage images')).toBeVisible();