mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
feat(runtime): Add "data-testid" attributes to UI nodes (#42)
This commit is contained in:
@@ -43,6 +43,7 @@ const TextInputNode = {
|
||||
return TextInput;
|
||||
},
|
||||
initialize() {
|
||||
this.props.attrs = {};
|
||||
this.props.startValue = '';
|
||||
this.props.id = this._internal.controlId = 'input-' + guid();
|
||||
},
|
||||
@@ -167,6 +168,16 @@ const TextInputNode = {
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
testId: {
|
||||
index: 100009,
|
||||
displayName: 'Test ID Attribute',
|
||||
group: 'Advanced HTML',
|
||||
type: 'string',
|
||||
set(value) {
|
||||
this.props.attrs["data-testid"] = value;
|
||||
this.forceUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
inputCss: {
|
||||
|
||||
Reference in New Issue
Block a user