I want to generate a click() on a Label component programmatically, for UI testing. Apart from the fact that I should not be doing this for UI testing and I should be recording the data instead which at the moment I cannot as we do not have a clean MVC implementation yet, is there any reason why generating a fake click this way fails to call mouseUp()
The alternative seems to be, to convert the Label center Point to global co-ordinates(screen co-ordinates?) using Component::localPointToGlobal() and generate a Windows Message using Windows APIs. But I would rather stay platform agnostic with Juce.
If the component has been already scrolled away such that its not visible currently then there is a mis-click.
Is there any way to force a Component to become visible? For example if its a Label at the top of a ViewPort and the ViewPort has been scrolled too much such that the Label is not currently visible.
Then calling something like Label::makeVisible() scrolls the ViewPort to make the label visible?