From 97e1a73dc80b373dc1e15dc8beaba0665646616c Mon Sep 17 00:00:00 2001 From: Midhun Kumar E Date: Wed, 12 Apr 2023 12:54:16 +0530 Subject: [PATCH] Add data-cy for modal components (#6015) --- frontend/src/Editor/Components/Modal.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/Editor/Components/Modal.jsx b/frontend/src/Editor/Components/Modal.jsx index 7921161d94..f5049664eb 100644 --- a/frontend/src/Editor/Components/Modal.jsx +++ b/frontend/src/Editor/Components/Modal.jsx @@ -116,6 +116,7 @@ export const Modal = function Modal({ setShowModal(true); setExposedVariable('show', true).then(() => fireEvent('onOpen')); }} + data-cy={`${dataCy}-launch-button`} > {triggerButtonLabel ?? 'Show Modal'} @@ -196,11 +197,14 @@ const Component = ({ children, ...restProps }) => { /> )} {!hideTitleBar && ( - - {title} + + + {title} + {!hideCloseButton && ( { e.preventDefault(); @@ -228,7 +232,7 @@ const Component = ({ children, ...restProps }) => { )} )} - + {children}