diff --git a/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js b/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js index e1eb55bc4e..ccaad1afa2 100644 --- a/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js +++ b/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js @@ -9,6 +9,7 @@ import { } from 'components/admin/form_design/registrations/objectsapi/mocks'; import { mockCaseTypesGet, + mockProductsGet, mockCataloguesGet as mockZGWApisCataloguesGet, } from 'components/admin/form_design/registrations/zgw/mocks'; import { @@ -207,7 +208,7 @@ export default { mockObjectsApiCataloguesGet(), mockDocumentTypesGet(), ], - zgwMocks: [mockZGWApisCataloguesGet(), mockCaseTypesGet()], + zgwMocks: [mockZGWApisCataloguesGet(), mockCaseTypesGet(), mockProductsGet()], }, }, }, diff --git a/src/openforms/js/components/admin/form_design/registrations/zgw/ZGWOptionsFormFields.stories.js b/src/openforms/js/components/admin/form_design/registrations/zgw/ZGWOptionsFormFields.stories.js index 168db28dcd..7aba961b13 100644 --- a/src/openforms/js/components/admin/form_design/registrations/zgw/ZGWOptionsFormFields.stories.js +++ b/src/openforms/js/components/admin/form_design/registrations/zgw/ZGWOptionsFormFields.stories.js @@ -9,7 +9,7 @@ import { } from 'components/admin/form_design/story-decorators'; import ZGWFormFields from './ZGWOptionsFormFields'; -import {mockCaseTypesGet, mockCataloguesGet} from './mocks'; +import {mockCaseTypesGet, mockCataloguesGet, mockProductsGet} from './mocks'; const NAME = 'form.registrationBackends.0.options'; diff --git a/src/openforms/js/components/admin/form_design/registrations/zgw/mocks.js b/src/openforms/js/components/admin/form_design/registrations/zgw/mocks.js index 5ff745cbf3..bb5ef0b91e 100644 --- a/src/openforms/js/components/admin/form_design/registrations/zgw/mocks.js +++ b/src/openforms/js/components/admin/form_design/registrations/zgw/mocks.js @@ -74,3 +74,20 @@ export const mockCaseTypesGet = () => const match = CASE_TYPES[catalogueUrl] ?? []; return res(ctx.json(match)); }); + +const PRODUCTS = [ + { + uri: 'https://example.com/product/1234', + }, + { + uri: 'https://example.com/product/4321', + }, + { + uri: 'https://example.com/product/1423', + }, +]; + +export const mockProductsGet = () => + rest.get(`${API_BASE_URL}/api/v2/registration/plugins/zgw-api/products`, (req, res, ctx) => { + return res(ctx.json(PRODUCTS)); + });