mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Add data-cy for modal components (#6015)
This commit is contained in:
parent
a8c8280896
commit
97e1a73dc8
1 changed files with 7 additions and 3 deletions
|
|
@ -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'}
|
||||
</button>
|
||||
|
|
@ -196,11 +197,14 @@ const Component = ({ children, ...restProps }) => {
|
|||
/>
|
||||
)}
|
||||
{!hideTitleBar && (
|
||||
<BootstrapModal.Header style={{ ...customStyles.modalHeader }}>
|
||||
<BootstrapModal.Title id="contained-modal-title-vcenter">{title}</BootstrapModal.Title>
|
||||
<BootstrapModal.Header style={{ ...customStyles.modalHeader }} data-cy={`modal-header`}>
|
||||
<BootstrapModal.Title id="contained-modal-title-vcenter" data-cy={`modal-title`}>
|
||||
{title}
|
||||
</BootstrapModal.Title>
|
||||
{!hideCloseButton && (
|
||||
<span
|
||||
className="cursor-pointer"
|
||||
data-cy={`modal-close-button`}
|
||||
size="sm"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
|
@ -228,7 +232,7 @@ const Component = ({ children, ...restProps }) => {
|
|||
)}
|
||||
</BootstrapModal.Header>
|
||||
)}
|
||||
<BootstrapModal.Body style={{ ...customStyles.modalBody }} ref={parentRef} id={id}>
|
||||
<BootstrapModal.Body style={{ ...customStyles.modalBody }} ref={parentRef} id={id} data-cy={`modal-body`}>
|
||||
{children}
|
||||
</BootstrapModal.Body>
|
||||
</BootstrapModal>
|
||||
|
|
|
|||
Loading…
Reference in a new issue