X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/716f55edbae8b8a16e2479e1f0e75619567df051..562687ce72e709d485aa47773117a51a764a6606:/services/workbench2/src/views-components/sharing-dialog/sharing-dialog-component.tsx

diff --git a/services/workbench2/src/views-components/sharing-dialog/sharing-dialog-component.tsx b/services/workbench2/src/views-components/sharing-dialog/sharing-dialog-component.tsx
index a4800521de..01082211d3 100644
--- a/services/workbench2/src/views-components/sharing-dialog/sharing-dialog-component.tsx
+++ b/services/workbench2/src/views-components/sharing-dialog/sharing-dialog-component.tsx
@@ -111,7 +111,7 @@ export default (props: SharingDialogComponentProps) => {
             {tabNr === SharingDialogTab.PERMISSIONS &&
                 <Grid container direction='column' spacing={24}>
                     <Grid item>
-                        <SharingInvitationForm onSave={onSave} saveEnabled={saveEnabled} />
+                        <SharingInvitationForm onSave={onSave} />
                     </Grid>
                     <Grid item>
                         <SharingManagementForm onSave={onSave} />
@@ -180,27 +180,27 @@ export default (props: SharingDialogComponentProps) => {
                 }
                 <Grid item>
                     <Button onClick={() => {
-                            onSave();
+                        onClose();
+                        setWithExpiration(false);
                         }}
-                        disabled={!saveEnabled}
+                        disabled={saveEnabled}
                         color='primary'
-                        variant='contained'
                         size='small'
                         style={{ marginLeft: '10px' }}
                         >
-                            Save
+                            Close
                     </Button>
                     <Button onClick={() => {
-                        onClose();
-                        setWithExpiration(false);
+                            onSave();
                         }}
-                        disabled={saveEnabled}
+                        data-cy="add-invited-people"
+                        disabled={!saveEnabled}
                         color='primary'
                         variant='contained'
                         size='small'
                         style={{ marginLeft: '10px' }}
                         >
-                            Close
+                            Save
                     </Button>
                 </Grid>
             </Grid>
