I'm not sure if you are aware, but it is currently very difficult to test spark Application components using FlexUnit and the UIImpersonator. An application component can't simply be added to UIImpersonator with addChild; there is already an existing Application for the test environment. What you have to do instead is create and add a SWFLoader and then use that to load an instance of the Application to test. The workaround is not very difficult, but having a mention of this issue in the documentation somewhere would have been helpful. Better yet perhaps add a function to UIImpersonator that takes care of the extra steps involved in testing an Application. What do you think?
↧