X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/16cba0902c3f450bd958fe77125bb583ed53b8a4..c2ba0170975fd01e2b3d9229b491ef2dc8c2f010:/src/components/confirmation-dialog/confirmation-dialog.tsx?ds=sidebyside

diff --git a/src/components/confirmation-dialog/confirmation-dialog.tsx b/src/components/confirmation-dialog/confirmation-dialog.tsx
index 079576fd..fa09ffc6 100644
--- a/src/components/confirmation-dialog/confirmation-dialog.tsx
+++ b/src/components/confirmation-dialog/confirmation-dialog.tsx
@@ -2,15 +2,15 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { Dialog, DialogTitle, DialogContent, DialogActions, Button, DialogContentText } from "@material-ui/core";
-import { WithDialogProps } from "~/store/dialog/with-dialog";
-import { WarningIcon } from '~/components/icon/icon';
+import { WithDialogProps } from "store/dialog/with-dialog";
+import { WarningIcon } from 'components/icon/icon';
 
 export interface ConfirmationDialogDataProps {
     title: string;
     text: string;
-    info?: string; 
+    info?: string;
     cancelButtonLabel?: string;
     confirmButtonLabel?: string;
 }
@@ -21,27 +21,31 @@ export interface ConfirmationDialogProps {
 
 export const ConfirmationDialog = (props: ConfirmationDialogProps & WithDialogProps<ConfirmationDialogDataProps>) =>
     <Dialog open={props.open}>
-        <DialogTitle>{props.data.title}</DialogTitle>
-        <DialogContent style={{ display: 'flex', alignItems: 'center' }}>
-            <WarningIcon />
-            <DialogContentText style={{ paddingLeft: '8px' }}>
-                <div>{props.data.text}</div>
-                <div>{props.data.info}</div>
-            </DialogContentText>
-        </DialogContent>
-        <DialogActions style={{ margin: '0px 24px 24px' }}>
-            <Button
-                variant='flat'
-                color='primary'
-                onClick={props.closeDialog}>
-                {props.data.cancelButtonLabel || 'Cancel'}
-            </Button>
-            <Button
-                variant='contained'
-                color='primary'
-                type='submit'
-                onClick={props.onConfirm}>
-                {props.data.confirmButtonLabel || 'Ok'}
-            </Button>
-        </DialogActions>
+        <div data-cy='confirmation-dialog'>
+            <DialogTitle>{props.data.title}</DialogTitle>
+            <DialogContent style={{ display: 'flex', alignItems: 'center' }}>
+                <WarningIcon />
+                <DialogContentText style={{ paddingLeft: '8px' }}>
+                    <span style={{display: 'block'}}>{props.data.text}</span>
+                    <span style={{display: 'block'}}>{props.data.info}</span>
+                </DialogContentText>
+            </DialogContent>
+            <DialogActions style={{ margin: '0px 24px 24px' }}>
+                <Button
+                    data-cy='confirmation-dialog-cancel-btn'
+                    variant='text'
+                    color='primary'
+                    onClick={props.closeDialog}>
+                    {props.data.cancelButtonLabel || 'Cancel'}
+                </Button>
+                <Button
+                    data-cy='confirmation-dialog-ok-btn'
+                    variant='contained'
+                    color='primary'
+                    type='submit'
+                    onClick={props.onConfirm}>
+                    {props.data.confirmButtonLabel || 'Ok'}
+                </Button>
+            </DialogActions>
+        </div>
     </Dialog>;
