RE: How to start file download for FIleDownloader extended button in test.


Not sure if it’s easily testable. In the Framework UI tests, it’s just done like this:

Corresponding test UI here:


I want to make unit tests that verify my download functionality. I have code like this.

FileDownloader fd = new FileDownloader(zip); 
Button downloadButton = new Button("Download project");

As far I understand its a vaadin best practices for downloading files in version >7. But how to test such functionality? Simple doesnt work due to this button dont have buttonClick listener. But this functionality works without buttonClick listener. Any ideas?