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

Hi,

Not sure if it’s easily testable. In the Framework UI tests, it’s just done like this:
https://github.com/vaadin/framework/blob/master/uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java

Corresponding test UI here: https://github.com/vaadin/framework/blob/master/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java

-Olli

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");
fd.extend(downloadButton);

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