mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Add data-cy (#5411)
This commit is contained in:
parent
29d3779830
commit
eaa5b6d4ae
4 changed files with 8 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ export const KanbanBoard = ({
|
|||
containerProps,
|
||||
removeComponent,
|
||||
fireEvent,
|
||||
dataCy,
|
||||
}) => {
|
||||
const { columns, cardData, enableAddCard } = properties;
|
||||
|
||||
|
|
@ -115,6 +116,7 @@ export const KanbanBoard = ({
|
|||
style={{ display: visibility ? '' : 'none' }}
|
||||
data-disabled={disabledState}
|
||||
className={`kanban-container p-0 ${darkMode ? 'dark-themed' : ''}`}
|
||||
data-cy={dataCy}
|
||||
>
|
||||
<Board
|
||||
height={height}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export const Map = function Map({
|
|||
onEvent,
|
||||
// canvasWidth,
|
||||
registerAction,
|
||||
dataCy,
|
||||
}) {
|
||||
const center = component.definition.properties.initialLocation.value;
|
||||
const defaultMarkerValue = component.definition.properties.defaultMarkers.value;
|
||||
|
|
@ -142,6 +143,7 @@ export const Map = function Map({
|
|||
onComponentClick(id, component, event);
|
||||
}}
|
||||
className="map-widget"
|
||||
data-cy={dataCy}
|
||||
>
|
||||
<div
|
||||
className="map-center"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export const Modal = function Modal({
|
|||
setExposedVariable,
|
||||
registerAction,
|
||||
fireEvent,
|
||||
dataCy,
|
||||
}) {
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
const { hideOnEsc, hideCloseButton, hideTitleBar, loadingState, useDefaultButton, triggerButtonLabel } = properties;
|
||||
|
|
@ -111,7 +112,7 @@ export const Modal = function Modal({
|
|||
}, [containerProps.mode, parentRef]);
|
||||
|
||||
return (
|
||||
<div className="container" data-disabled={disabledState}>
|
||||
<div className="container" data-disabled={disabledState} data-cy={dataCy}>
|
||||
{useDefaultButton && (
|
||||
<button
|
||||
disabled={disabledState}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|||
import QrReader from 'react-qr-reader';
|
||||
import ErrorModal from './ErrorModal';
|
||||
|
||||
export const QrScanner = function QrScanner({ styles, fireEvent, setExposedVariable }) {
|
||||
export const QrScanner = function QrScanner({ styles, fireEvent, setExposedVariable, dataCy }) {
|
||||
const handleError = async (errorMessage) => {
|
||||
console.log(errorMessage);
|
||||
await setErrorOccured(true);
|
||||
|
|
@ -20,7 +20,7 @@ export const QrScanner = function QrScanner({ styles, fireEvent, setExposedVaria
|
|||
const { visibility, disabledState } = styles;
|
||||
|
||||
return (
|
||||
<div data-disabled={disabledState} style={{ display: visibility ? '' : 'none' }}>
|
||||
<div data-disabled={disabledState} style={{ display: visibility ? '' : 'none' }} data-cy={dataCy}>
|
||||
{errorOccured ? <ErrorModal /> : <QrReader onError={handleError} onScan={handleScan} />}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue