@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void removeFileFromUploadList() {
File keptUploadFile = testFileGenerator.generateTestFileWithContent(
"removeFileFromUploadList", ".txt", "Remove File Upload Test");
VersionDocumentsTab versionDocumentsTab = new ProjectWorkFlow()
.goToProjectByName("multi-upload")
.gotoVersion("multi-upload")
.gotoSettingsTab()
.gotoSettingsDocumentsTab()
.pressUploadFileButton()
.enterFilePath(keptUploadFile.getAbsolutePath())
.enterFilePath("/tmp/fakefile.txt");
assertThat(versionDocumentsTab.getUploadList())
.contains(keptUploadFile.getName())
.contains("fakefile.txt")
.as("The intended files are listed");
versionDocumentsTab = versionDocumentsTab.clickRemoveOn("fakefile.txt");
assertThat(versionDocumentsTab.getUploadList())
.contains(keptUploadFile.getName())
.doesNotContain("fakefile.txt")
.as("The fakefile has been removed");
VersionDocumentsPage versionDocumentsPage = versionDocumentsTab
.submitUpload()
.clickUploadDone()
.gotoDocumentTab();
assertThat(versionDocumentsPage.getSourceDocumentNames())