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();