Add testing identifier to elements

This commit is contained in:
lethemanh
2024-12-09 21:14:46 +07:00
parent df5c472d7b
commit 217e683269
43 changed files with 201 additions and 102 deletions
@@ -62,6 +62,7 @@ export default class ButtonWithTimeout extends React.Component {
(this.props.className ? this.props.className : '')
}
onClick={this.props.onClick}
testClassId={this.props.testClassId}
>
{this.props.value}
</Button>
@@ -27,7 +27,7 @@ export default class Button extends React.Component {
<button
ref={this.props.refButton}
{...this.props}
className={'button no-tw ' + className}
className={'button no-tw ' + className + ` testid:${this.props.testClassId}`}
onClick={evt => {
evt.target.blur();
this.props.onClick && this.props.onClick(evt);