When I create plane java Swing components like dialog boxes etc, it is very easy to make a unit test to display the Dialog. Basically, I can just create an instance of the dialog and call setIsVisible(true). I'm having a really tough time figuring out how to do this with a griffon View. I've been trying to do this with integration tests but I can't seem to get it.
I've tried a few things to show the view and nothing seems to work. The only way I seem to be able to get an instance of the view is:
AirplaneView view = helper.newInstance(app, griffonpractice.AirplaneView.class, "Airplane")
After this I thought I may be able to do a view.setIsVisible(true) or view.frame.setIsVisible(true)
but no luck. I'm guessing I am thinking about this the wrong way, there has to be a fairly simple way to do this. Any help is appreciated. My view looks like the following, note that there are no bindings so I shouldn't need to mock anything.
package griffonpractice
import javax.swing.JFrame
JFrame frame = application(title: 'GriffonPractice',
size: [320,480],
pack: true,
location: [50,50],
locationByPlatform:true){
borderLayout()
{
hbox(constraints: BL.NORTH)
{
label(text: "shane")
label(text: "Jack");
}
}
}