@evoke-platform/ui-components 1.10.0-testing.1 → 1.10.0-testing.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +1 -1
  2. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.test.d.ts +1 -0
  3. package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.test.js +430 -0
  4. package/dist/published/components/custom/CriteriaBuilder/ValueEditor.js +19 -6
  5. package/dist/published/components/custom/Form/utils.js +1 -0
  6. package/dist/published/components/custom/FormV2/FormRenderer.js +13 -3
  7. package/dist/published/components/custom/FormV2/FormRendererContainer.d.ts +0 -2
  8. package/dist/published/components/custom/FormV2/FormRendererContainer.js +10 -5
  9. package/dist/published/components/custom/FormV2/components/Footer.js +1 -0
  10. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/ActionDialog.js +1 -1
  11. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.d.ts +0 -3
  12. package/dist/published/components/custom/FormV2/components/FormFieldTypes/CollectionFiles/RepeatableField.js +31 -27
  13. package/dist/published/components/custom/FormV2/components/FormFieldTypes/Image.js +1 -2
  14. package/dist/published/components/custom/FormV2/components/Header.d.ts +1 -0
  15. package/dist/published/components/custom/FormV2/components/Header.js +5 -2
  16. package/dist/published/components/custom/FormV2/components/RecursiveEntryRenderer.js +4 -15
  17. package/dist/published/components/custom/FormV2/components/utils.js +2 -7
  18. package/dist/published/components/custom/FormV2/tests/FormRenderer.test.js +432 -4
  19. package/dist/published/components/custom/FormV2/tests/FormRendererContainer.test.js +202 -12
  20. package/dist/published/components/custom/FormV2/tests/test-data.js +2 -0
  21. package/dist/published/stories/FormRendererContainer.stories.d.ts +0 -10
  22. package/dist/published/stories/FormRendererContainer.stories.js +7 -3
  23. package/dist/published/stories/FormRendererData.js +3 -43
  24. package/package.json +3 -1
@@ -20,7 +20,7 @@ const WithProviders = ({ children }) => {
20
20
  return React.createElement(MemoryRouter, null, children);
21
21
  };
22
22
  const render = (ui, options) => baseRender(ui, { wrapper: WithProviders, ...options });
23
- describe('Form component', () => {
23
+ describe('FormRenderer', () => {
24
24
  let server;
25
25
  beforeAll(() => {
26
26
  server = setupServer(http.get('/api/data/objects/specialtyType/effective', () => HttpResponse.json(specialtyTypeObject)), http.get('/api/data/objects/specialtyType/effective', (req) => {
@@ -59,9 +59,9 @@ describe('Form component', () => {
59
59
  npSpecialtyType1,
60
60
  npSpecialtyType2,
61
61
  ]);
62
- else if (isEqual(whereFilter, { and: [{ 'licenseType.id': 'rnLicenseType' }, {}] }))
62
+ else if (isEqual(whereFilter, { 'licenseType.id': 'rnLicenseType' }))
63
63
  return HttpResponse.json([rnSpecialtyType1, rnSpecialtyType2]);
64
- else if (isEqual(whereFilter, { and: [{ 'licenseType.id': 'npLicenseType' }, {}] }))
64
+ else if (isEqual(whereFilter, { 'licenseType.id': 'npLicenseType' }))
65
65
  return HttpResponse.json([npSpecialtyType1, npSpecialtyType2]);
66
66
  }
67
67
  }), http.get('/api/accessManagement/users', () => HttpResponse.json(users)));
@@ -650,13 +650,19 @@ describe('Form component', () => {
650
650
  parameterId: 'specialtyType',
651
651
  display: {
652
652
  label: 'Speciality Type',
653
+ createActionId: '_create',
653
654
  },
654
655
  },
655
656
  ],
656
657
  actionId: '_update',
657
658
  objectId: 'relatedObjectTestForm',
658
659
  };
660
+ let scrollIntoViewMock;
661
+ let originalScrollIntoView;
659
662
  beforeEach(async () => {
663
+ scrollIntoViewMock = vitest.fn();
664
+ originalScrollIntoView = Element.prototype.scrollIntoView;
665
+ Element.prototype.scrollIntoView = scrollIntoViewMock;
660
666
  const relatedObjectTestFormObject = {
661
667
  id: 'relatedObjectTestForm',
662
668
  name: 'Related Object Test Form',
@@ -693,9 +699,20 @@ describe('Form component', () => {
693
699
  type: 'content',
694
700
  html: '<div>Specialty Type Form Content</div>',
695
701
  },
702
+ {
703
+ type: 'input',
704
+ parameterId: 'requiredField',
705
+ display: {
706
+ label: 'Required Field',
707
+ required: true,
708
+ },
709
+ },
696
710
  ],
697
711
  actionId: '_create',
698
712
  objectId: 'specialtyType',
713
+ display: {
714
+ submitLabel: 'Create Specialty Type',
715
+ },
699
716
  };
700
717
  const specialtyTypeObject = {
701
718
  id: 'specialtyType',
@@ -705,7 +722,14 @@ describe('Form component', () => {
705
722
  id: '_create',
706
723
  name: 'Create',
707
724
  type: 'create',
708
- parameters: [],
725
+ parameters: [
726
+ {
727
+ id: 'requiredField',
728
+ name: 'Required Field',
729
+ type: 'string',
730
+ required: true,
731
+ },
732
+ ],
709
733
  outputEvent: 'created',
710
734
  defaultFormId: 'specialtyTypeForm',
711
735
  },
@@ -721,6 +745,9 @@ describe('Form component', () => {
721
745
  };
722
746
  setupTestMocks(specialtyTypeObject, specialtyTypeForm);
723
747
  });
748
+ afterEach(() => {
749
+ Element.prototype.scrollIntoView = originalScrollIntoView;
750
+ });
724
751
  it('displays an add button for related object fields', async () => {
725
752
  render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
726
753
  await screen.findByRole('button', { name: 'Add' });
@@ -813,6 +840,63 @@ describe('Form component', () => {
813
840
  await user.click(newRecordButton);
814
841
  await screen.findByText(/not found/i);
815
842
  });
843
+ it('should show validation errors in record creation mode', async () => {
844
+ const user = userEvent.setup();
845
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
846
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
847
+ const newRecordButton = await screen.findByRole('radio', { name: /new/i });
848
+ await user.click(newRecordButton);
849
+ const createSpecialtyTypeButton = await screen.findByRole('button', {
850
+ name: /create specialty type/i,
851
+ });
852
+ await user.click(createSpecialtyTypeButton);
853
+ const errorMessage = await screen.findByRole('listitem');
854
+ expect(errorMessage).toHaveTextContent('Required Field is required');
855
+ });
856
+ it('should clear validation errors after they have been resolved', async () => {
857
+ const user = userEvent.setup();
858
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
859
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
860
+ const newRecordButton = await screen.findByRole('radio', { name: /new/i });
861
+ await user.click(newRecordButton);
862
+ const createSpecialtyTypeButton = await screen.findByRole('button', {
863
+ name: /create specialty type/i,
864
+ });
865
+ await user.click(createSpecialtyTypeButton);
866
+ // Make sure error elements appear
867
+ screen.getByRole('listitem');
868
+ const requiredField = screen.getByRole('textbox', { name: /Required Field */i });
869
+ await user.type(requiredField, 'Some content here...');
870
+ expect(screen.queryByRole('listitem')).not.toBeInTheDocument();
871
+ });
872
+ it('should scroll to validation errors after submission', async () => {
873
+ const user = userEvent.setup();
874
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
875
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
876
+ const newRecordButton = await screen.findByRole('radio', { name: /new/i });
877
+ await user.click(newRecordButton);
878
+ const createSpecialtyTypeButton = await screen.findByRole('button', {
879
+ name: /create specialty type/i,
880
+ });
881
+ await user.click(createSpecialtyTypeButton);
882
+ expect(scrollIntoViewMock).toHaveBeenCalled();
883
+ });
884
+ it('should not scroll to validation errors if there are none', async () => async () => {
885
+ const user = userEvent.setup();
886
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
887
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
888
+ const newRecordButton = await screen.findByRole('radio', { name: /new/i });
889
+ await user.click(newRecordButton);
890
+ // Make sure error elements appear
891
+ screen.getByRole('listitem');
892
+ const requiredField = await screen.findByRole('textbox', { name: /Required Field */i });
893
+ await user.type(requiredField, 'Some content here...');
894
+ const createSpecialtyTypeButton = await screen.findByRole('button', {
895
+ name: /create specialty type/i,
896
+ });
897
+ await user.click(createSpecialtyTypeButton);
898
+ expect(scrollIntoViewMock).not.toHaveBeenCalled();
899
+ });
816
900
  });
817
901
  });
818
902
  describe('when in dropdown view', () => {
@@ -922,6 +1006,7 @@ describe('Form component', () => {
922
1006
  display: {
923
1007
  label: 'Speciality Type',
924
1008
  relatedObjectDisplay: 'dropdown',
1009
+ createActionId: '_create',
925
1010
  },
926
1011
  },
927
1012
  ],
@@ -1021,4 +1106,347 @@ describe('Form component', () => {
1021
1106
  });
1022
1107
  });
1023
1108
  });
1109
+ describe('when passed a one-to-many collection entry', () => {
1110
+ const setupTestMocks = (object, form, instances) => {
1111
+ server.use(http.get(`/api/data/objects/${object.id}/effective`, () => HttpResponse.json(object)), http.get(`/api/data/forms/${form.id}`, () => HttpResponse.json(form)), http.get(`/api/data/forms?filter={"where":{"actionId":"${form.actionId}","objectId":"${object.id}"}}`, () => HttpResponse.json([form])), http.get(`/api/data/objects/${object.id}/instances`, () => HttpResponse.json(instances || [])), http.get(`/api/data/objects/${object.id}/instances/checkAccess`, () => HttpResponse.json({
1112
+ result: true,
1113
+ })));
1114
+ };
1115
+ const form = {
1116
+ id: 'collectionTestForm',
1117
+ name: 'Collection Test Form',
1118
+ entries: [
1119
+ {
1120
+ type: 'inputField',
1121
+ input: {
1122
+ id: 'collection',
1123
+ type: 'collection',
1124
+ objectId: 'collectionObject',
1125
+ relatedPropertyId: 'relatedObject',
1126
+ },
1127
+ display: {
1128
+ label: 'Collection',
1129
+ createActionId: '_create',
1130
+ },
1131
+ },
1132
+ ],
1133
+ actionId: '_update',
1134
+ objectId: 'testObjectForCollections',
1135
+ };
1136
+ let scrollIntoViewMock;
1137
+ let originalScrollIntoView;
1138
+ beforeEach(() => {
1139
+ scrollIntoViewMock = vitest.fn();
1140
+ originalScrollIntoView = Element.prototype.scrollIntoView;
1141
+ Element.prototype.scrollIntoView = scrollIntoViewMock;
1142
+ const collectionFormObject = {
1143
+ id: 'testObjectForCollections',
1144
+ name: 'Object for one-to-many collections tests',
1145
+ actions: [
1146
+ {
1147
+ id: '_update',
1148
+ name: 'Update',
1149
+ type: 'update',
1150
+ outputEvent: 'updated',
1151
+ },
1152
+ ],
1153
+ properties: [
1154
+ {
1155
+ id: 'collection',
1156
+ name: 'Collection',
1157
+ type: 'collection',
1158
+ objectId: 'collectionObject',
1159
+ relatedPropertyId: 'relatedObject',
1160
+ },
1161
+ ],
1162
+ };
1163
+ setupTestMocks(collectionFormObject, form);
1164
+ const collectionObject = {
1165
+ id: 'collectionObject',
1166
+ name: 'Collection Object',
1167
+ properties: [
1168
+ {
1169
+ name: 'Name',
1170
+ id: 'name',
1171
+ type: 'string',
1172
+ },
1173
+ {
1174
+ name: 'Related Object',
1175
+ id: 'relatedObject',
1176
+ type: 'object',
1177
+ objectId: 'testObjectForCollections',
1178
+ },
1179
+ ],
1180
+ actions: [
1181
+ {
1182
+ id: '_create',
1183
+ name: 'Create',
1184
+ type: 'create',
1185
+ outputEvent: 'created',
1186
+ parameters: [
1187
+ {
1188
+ id: 'name',
1189
+ name: 'Name',
1190
+ type: 'string',
1191
+ },
1192
+ {
1193
+ id: 'relatedObject',
1194
+ name: 'Related Object',
1195
+ type: 'object',
1196
+ objectId: 'testObjectForCollections',
1197
+ },
1198
+ ],
1199
+ },
1200
+ ],
1201
+ };
1202
+ const collectionObjectForm = {
1203
+ id: 'collectionObjectForm',
1204
+ name: 'Collection Object Form',
1205
+ entries: [
1206
+ {
1207
+ type: 'input',
1208
+ parameterId: 'name',
1209
+ display: {
1210
+ label: 'Name',
1211
+ required: true,
1212
+ },
1213
+ },
1214
+ {
1215
+ type: 'input',
1216
+ parameterId: 'relatedObject',
1217
+ display: {
1218
+ label: 'Related Object',
1219
+ relatedObjectDisplay: 'dropdown',
1220
+ },
1221
+ },
1222
+ ],
1223
+ actionId: '_create',
1224
+ objectId: 'collectionObject',
1225
+ display: {
1226
+ submitLabel: 'Create Collection Item',
1227
+ },
1228
+ };
1229
+ setupTestMocks(collectionObject, collectionObjectForm);
1230
+ });
1231
+ afterEach(() => {
1232
+ Element.prototype.scrollIntoView = originalScrollIntoView;
1233
+ });
1234
+ it('should render collection field', async () => {
1235
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1236
+ await screen.findByText('Collection');
1237
+ });
1238
+ it('should not render an add button if user does not have permission to create collection items', async () => {
1239
+ server.use(http.get('/api/data/objects/collectionObject/instances/checkAccess', () => HttpResponse.json({
1240
+ result: false,
1241
+ })));
1242
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1243
+ const addButton = screen.queryByRole('button', { name: /add/i });
1244
+ expect(addButton).not.toBeInTheDocument();
1245
+ });
1246
+ it('should render an add button for the collection when user has permission to create collection items', async () => {
1247
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1248
+ await screen.findByRole('button', { name: /add/i });
1249
+ });
1250
+ it('should open a dialog when clicking the add button', async () => {
1251
+ const user = userEvent.setup();
1252
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1253
+ const addButton = await screen.findByRole('button', { name: /add/i });
1254
+ await user.click(addButton);
1255
+ await screen.findByRole('dialog');
1256
+ });
1257
+ it('should render a close button in the collection dialog', async () => {
1258
+ const user = userEvent.setup();
1259
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1260
+ const addButton = await screen.findByRole('button', { name: /add/i });
1261
+ await user.click(addButton);
1262
+ await screen.findByRole('button', { name: 'Close' });
1263
+ });
1264
+ it('should allow closing the collection dialog using the close button', async () => {
1265
+ const user = userEvent.setup();
1266
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1267
+ const addButton = await screen.findByRole('button', { name: /add/i });
1268
+ await user.click(addButton);
1269
+ const dialog = await screen.findByRole('dialog');
1270
+ const closeButton = await screen.findByRole('button', { name: 'Close' });
1271
+ await user.click(closeButton);
1272
+ await waitFor(() => expect(dialog).not.toBeInTheDocument());
1273
+ });
1274
+ it('shows a cancel button in the collection dialog', async () => {
1275
+ const user = userEvent.setup();
1276
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1277
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
1278
+ await screen.findByRole('button', { name: 'Cancel' });
1279
+ });
1280
+ it('closes dialog in the collection dialog clicking cancel', async () => {
1281
+ const user = userEvent.setup();
1282
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1283
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
1284
+ const dialog = await screen.findByRole('dialog');
1285
+ await user.click(await screen.findByRole('button', { name: 'Cancel' }));
1286
+ await waitFor(() => expect(dialog).not.toBeInTheDocument());
1287
+ });
1288
+ it('displays a submit button in the collection dialog', async () => {
1289
+ const user = userEvent.setup();
1290
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1291
+ await user.click(await screen.findByRole('button', { name: 'Add' }));
1292
+ await screen.findByRole('button', { name: 'Create Collection Item' });
1293
+ });
1294
+ it('should hide related object field in collection item form', async () => {
1295
+ const user = userEvent.setup();
1296
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1297
+ const addButton = await screen.findByRole('button', { name: /add/i });
1298
+ await user.click(addButton);
1299
+ await screen.findByRole('dialog');
1300
+ // Make sure other form entry is present
1301
+ await screen.findByRole('textbox', { name: 'Name *' });
1302
+ const relatedObjectField = screen.queryByRole('textbox', { name: 'Related Object' });
1303
+ expect(relatedObjectField).not.toBeInTheDocument();
1304
+ });
1305
+ it('should add newly created collection item to the collection list upon submission', async () => {
1306
+ const user = userEvent.setup();
1307
+ server.use(http.post('/api/data/objects/collectionObject/instances/actions', () => HttpResponse.json({
1308
+ id: 'newCollectionItemId',
1309
+ name: 'New Collection Item',
1310
+ objectId: 'collectionObject',
1311
+ relatedObject: {
1312
+ id: 'testInstanceId',
1313
+ name: 'Test Instance',
1314
+ },
1315
+ })));
1316
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1317
+ const addButton = await screen.findByRole('button', { name: /add/i });
1318
+ await user.click(addButton);
1319
+ await screen.findByRole('dialog');
1320
+ const nameField = screen.getByRole('textbox', { name: 'Name *' });
1321
+ await user.type(nameField, 'New Collection Item');
1322
+ const submitButton = screen.getByRole('button', { name: 'Create Collection Item' });
1323
+ await user.click(submitButton);
1324
+ await screen.findByRole('columnheader', { name: 'Name' });
1325
+ screen.getByRole('cell', { name: 'New Collection Item' });
1326
+ });
1327
+ it('should show validation errors', async () => {
1328
+ const user = userEvent.setup();
1329
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1330
+ const addButton = await screen.findByRole('button', { name: /add/i });
1331
+ await user.click(addButton);
1332
+ await screen.findByRole('dialog');
1333
+ const submitButton = screen.getByRole('button', { name: 'Create Collection Item' });
1334
+ await user.click(submitButton);
1335
+ const errorMessage = await screen.findByRole('listitem');
1336
+ expect(errorMessage).toHaveTextContent('Name is required');
1337
+ });
1338
+ it('should hide validation errors after they have been resolved', async () => {
1339
+ const user = userEvent.setup();
1340
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1341
+ const addButton = await screen.findByRole('button', { name: /add/i });
1342
+ await user.click(addButton);
1343
+ await screen.findByRole('dialog');
1344
+ const submitButton = screen.getByRole('button', { name: 'Create Collection Item' });
1345
+ await user.click(submitButton);
1346
+ // Make sure error elements appear
1347
+ screen.getByRole('listitem');
1348
+ const requiredField = screen.getByRole('textbox', { name: /Name */i });
1349
+ await user.type(requiredField, 'Some content here...');
1350
+ expect(screen.queryByRole('listitem')).not.toBeInTheDocument();
1351
+ });
1352
+ it('should scroll to validation errors on submit', async () => {
1353
+ const user = userEvent.setup();
1354
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1355
+ const addButton = await screen.findByRole('button', { name: /add/i });
1356
+ await user.click(addButton);
1357
+ await screen.findByRole('dialog');
1358
+ const submitButton = screen.getByRole('button', { name: 'Create Collection Item' });
1359
+ await user.click(submitButton);
1360
+ expect(scrollIntoViewMock).toHaveBeenCalled();
1361
+ });
1362
+ it('should not scroll to validation errors if there are none', async () => async () => {
1363
+ const user = userEvent.setup();
1364
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1365
+ const addButton = await screen.findByRole('button', { name: /add/i });
1366
+ await user.click(addButton);
1367
+ await screen.findByRole('dialog');
1368
+ const requiredField = await screen.findByRole('textbox', { name: /Name */i });
1369
+ await user.type(requiredField, 'Some content here...');
1370
+ const submitButton = screen.getByRole('button', { name: 'Create Collection Item' });
1371
+ await user.click(submitButton);
1372
+ expect(scrollIntoViewMock).not.toHaveBeenCalled();
1373
+ });
1374
+ });
1375
+ describe('when passed a text field entry', () => {
1376
+ it('should render text field', async () => {
1377
+ const form = {
1378
+ id: 'textFieldTestForm',
1379
+ name: 'Text Field Test Form',
1380
+ entries: [
1381
+ {
1382
+ type: 'inputField',
1383
+ input: {
1384
+ id: 'textField',
1385
+ type: 'string',
1386
+ },
1387
+ display: {
1388
+ label: 'Text Field',
1389
+ },
1390
+ },
1391
+ ],
1392
+ actionId: '_update',
1393
+ objectId: 'textFieldTestObject',
1394
+ };
1395
+ const textFieldTestObject = {
1396
+ id: 'textFieldTestObject',
1397
+ name: 'Text Field Test Object',
1398
+ actions: [
1399
+ {
1400
+ id: '_update',
1401
+ name: 'Update',
1402
+ type: 'update',
1403
+ outputEvent: 'updated',
1404
+ },
1405
+ ],
1406
+ properties: [],
1407
+ };
1408
+ server.use(http.get(`/api/data/objects/${textFieldTestObject.id}/effective`, () => HttpResponse.json(textFieldTestObject)));
1409
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1410
+ await screen.findByRole('textbox', { name: 'Text Field' });
1411
+ });
1412
+ it('should allow text input in text field', async () => {
1413
+ const user = userEvent.setup();
1414
+ const form = {
1415
+ id: 'textFieldTestForm',
1416
+ name: 'Text Field Test Form',
1417
+ entries: [
1418
+ {
1419
+ type: 'inputField',
1420
+ input: {
1421
+ id: 'textField',
1422
+ type: 'string',
1423
+ },
1424
+ display: {
1425
+ label: 'Text Field',
1426
+ },
1427
+ },
1428
+ ],
1429
+ actionId: '_update',
1430
+ objectId: 'textFieldTestObject',
1431
+ };
1432
+ const textFieldTestObject = {
1433
+ id: 'textFieldTestObject',
1434
+ name: 'Text Field Test Object',
1435
+ actions: [
1436
+ {
1437
+ id: '_update',
1438
+ name: 'Update',
1439
+ type: 'update',
1440
+ outputEvent: 'updated',
1441
+ },
1442
+ ],
1443
+ properties: [],
1444
+ };
1445
+ server.use(http.get(`/api/data/objects/${textFieldTestObject.id}/effective`, () => HttpResponse.json(textFieldTestObject)));
1446
+ render(React.createElement(FormRenderer, { form: form, onChange: () => { } }));
1447
+ const textField = await screen.findByRole('textbox', { name: 'Text Field' });
1448
+ await user.type(textField, 'Test Input');
1449
+ expect(textField).toHaveValue('Test Input');
1450
+ });
1451
+ });
1024
1452
  });