mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #~: Add data-cy selector to testing (#2064)
This commit is contained in:
parent
d91510862e
commit
cebaac8477
@ -114,6 +114,7 @@ const FormWithSchema = ({
|
||||
<LegendWrapper>
|
||||
{legend && (
|
||||
<Legend
|
||||
data-cy={`legend-${cy}`}
|
||||
title={legend}
|
||||
tooltip={legendTooltip}
|
||||
disableGutters={accordion}
|
||||
|
@ -39,8 +39,8 @@ const StyledLegend = styled((props) => (
|
||||
)
|
||||
|
||||
const Legend = memo(
|
||||
({ title, tooltip, disableGutters }) => (
|
||||
<StyledLegend ownerState={{ tooltip, disableGutters }}>
|
||||
({ 'data-cy': dataCy, title, tooltip, disableGutters }) => (
|
||||
<StyledLegend data-cy={dataCy} ownerState={{ tooltip, disableGutters }}>
|
||||
<Translate word={title} />
|
||||
{!!tooltip && <AdornmentWithTooltip title={tooltip} />}
|
||||
</StyledLegend>
|
||||
@ -49,6 +49,7 @@ const Legend = memo(
|
||||
)
|
||||
|
||||
Legend.propTypes = {
|
||||
'data-cy': PropTypes.string,
|
||||
title: PropTypes.any,
|
||||
tooltip: PropTypes.string,
|
||||
disableGutters: PropTypes.bool,
|
||||
|
@ -81,6 +81,7 @@ const ContextVarsSection = ({ hypervisor }) => {
|
||||
<AccordionSummary>
|
||||
<Legend
|
||||
disableGutters
|
||||
data-cy={'context-custom-vars'}
|
||||
title={T.ContextCustomVariables}
|
||||
tooltip={T.ContextCustomVariablesConcept}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user