Skip to content

Commit

Permalink
fix: add data-name attribute in ControlGroup for ease in writing auto…
Browse files Browse the repository at this point in the history
…mated UI tests
  • Loading branch information
harshpatel-crest committed May 10, 2021
1 parent b4752d3 commit 10da489
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/main/webapp/components/ControlWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const CustomElement = styled.div`
margin-left: 30px;
`;

const ControlGroupWrapper = styled(ControlGroup)`
const ControlGroupWrapper = styled(ControlGroup).attrs((props) => ({
'data-name': props.dataName,
}))`
width: 100%;
max-width: 100%;
Expand Down Expand Up @@ -78,6 +80,7 @@ class ControlWrapper extends React.PureComponent {
help={help}
tooltip={tooltip}
error={this.props.error}
dataName={field}
>
<CustomElement>{rowView}</CustomElement>
</ControlGroupWrapper>
Expand Down

0 comments on commit 10da489

Please sign in to comment.