I’m attempting to do a test of tooltip text on a node. The tooltip is set up with two elements (see below), the second of which is the TextBlock. I’m accessing the text via node.toolTip.elements[1].text. What I see is an empty string text property. I can see the binding description under the property localBindings, but I don’t seem to be access the result of binding. The tooltip is actually working just fine for manual checks in the UI. but I want to be able to do it in an automated test.
The only way I can get the text property populated is by uncommenting the text line in the TextBlock definition.
How do I access the result of text derived from a binding?
public getToolTip(fieldName: string): Object {
return {
toolTip:
this.$(go.Adornment, 'Auto',
this.$(go.Shape, {
fill: this.tooltipStyle.getPropertyValue('fill'),
}),
this.$(go.TextBlock, {
margin: new go.Margin(6),
font: StyleHelper.getFont(this.tooltipStyle),
//text: "DEFAULT TEXT"
},
new go.Binding('text', fieldName))
) // end of Adornment
};
}