Add more test id to elements based on test case e2e
This commit is contained in:
@@ -23,11 +23,14 @@ export default class Button extends React.Component {
|
||||
) {
|
||||
className += ' small';
|
||||
}
|
||||
|
||||
const testId = this.props.testClassId ? `testid:${this.props.testClassId}` : '';
|
||||
|
||||
return (
|
||||
<button
|
||||
ref={this.props.refButton}
|
||||
{...this.props}
|
||||
className={'button no-tw ' + className + ` testid:${this.props.testClassId}`}
|
||||
className={'button no-tw ' + className + ' ' + testId}
|
||||
onClick={evt => {
|
||||
evt.target.blur();
|
||||
this.props.onClick && this.props.onClick(evt);
|
||||
|
||||
Reference in New Issue
Block a user