Merge branch '16439-objects-creation-placement-fix'
[arvados-workbench2.git] / src / views-components / resource-properties-form / resource-properties-form.tsx
index a62b3d1563a8459333d7ae1be58c62ca97812256..0632b97cd5fbb4889b599b61f0f82eeaec538d92 100644 (file)
@@ -5,20 +5,22 @@
 import * as React from 'react';
 import { InjectedFormProps } from 'redux-form';
 import { Grid, withStyles, WithStyles } from '@material-ui/core';
-import { PropertyKeyField, PROPERTY_KEY_FIELD_NAME } from './property-key-field';
-import { PropertyValueField, PROPERTY_VALUE_FIELD_NAME } from './property-value-field';
+import { PropertyKeyField, PROPERTY_KEY_FIELD_NAME, PROPERTY_KEY_FIELD_ID } from './property-key-field';
+import { PropertyValueField, PROPERTY_VALUE_FIELD_NAME, PROPERTY_VALUE_FIELD_ID } from './property-value-field';
 import { ProgressButton } from '~/components/progress-button/progress-button';
 import { GridClassKey } from '@material-ui/core/Grid';
 
 export interface ResourcePropertiesFormData {
     [PROPERTY_KEY_FIELD_NAME]: string;
+    [PROPERTY_KEY_FIELD_ID]: string;
     [PROPERTY_VALUE_FIELD_NAME]: string;
+    [PROPERTY_VALUE_FIELD_ID]: string;
 }
 
 export type ResourcePropertiesFormProps = InjectedFormProps<ResourcePropertiesFormData> & WithStyles<GridClassKey>;
 
 export const ResourcePropertiesForm = ({ handleSubmit, submitting, invalid, classes }: ResourcePropertiesFormProps ) =>
-    <form onSubmit={handleSubmit}>
+    <form data-cy='collection-properties-form' onSubmit={handleSubmit}>
         <Grid container spacing={16} classes={classes}>
             <Grid item xs>
                 <PropertyKeyField />
@@ -39,6 +41,6 @@ export const ResourcePropertiesForm = ({ handleSubmit, submitting, invalid, clas
         </Grid>
     </form>;
 
-const Button = withStyles(theme => ({
+export const Button = withStyles(theme => ({
     root: { marginTop: theme.spacing.unit }
 }))(ProgressButton);