mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-12 07:12:54 +01:00
feat(runtime): Add "data-testid" attributes to UI nodes (#42)
This commit is contained in:
@@ -30,11 +30,24 @@ const ButtonNode = {
|
||||
]
|
||||
},
|
||||
initialize() {
|
||||
this.props.attrs = {};
|
||||
this.props.layout = 'row'; //Used to tell child nodes what layout to expect
|
||||
},
|
||||
getReactComponent() {
|
||||
return Button;
|
||||
},
|
||||
inputs: {
|
||||
testId: {
|
||||
index: 100009,
|
||||
displayName: 'Test ID Attribute',
|
||||
group: 'Advanced HTML',
|
||||
type: 'string',
|
||||
set(value) {
|
||||
this.props.attrs["data-testid"] = value;
|
||||
this.forceUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
inputCss: {
|
||||
backgroundColor: {
|
||||
index: 100,
|
||||
|
||||
Reference in New Issue
Block a user