Class UploadFileListTester<T extends UploadFileList>

java.lang.Object
com.vaadin.browserless.ComponentTester<T>
com.vaadin.flow.component.upload.UploadFileListTester<T>
Type Parameters:
T - the component type.
All Implemented Interfaces:
Clickable<T>

public class UploadFileListTester<T extends UploadFileList> extends ComponentTester<T>
Tester for UploadFileList components.

The file list shows the files of the UploadManager it is linked to: the files the user picked with an UploadButton or dropped on an UploadDropZone linked to the same manager. The tester reads that list and simulates the buttons on its entries. As in the browser, the file list is not usable while it is not linked to a manager or while the manager is disabled.

Entries are reached by file name or by position. As in the browser, nothing prevents the user from adding the same file, or another file with the same name, more than once: every one becomes an entry of its own, is uploaded on its own and counts towards UploadManager.setMaxFiles(int). When several entries share a name, removeFile(String) removes the most recently added one, which is the first one the list shows, and startUpload(String) starts the most recently added one that still waits to be started. To act on a specific entry, use removeFile(int) and startUpload(int) with its position in getFiles().