use of org.corpus_tools.annis.gui.ExportPanel in project ANNIS by korpling.
the class ExportPanelTest method testCSVExport.
@Test
void testCSVExport() throws Exception {
// Prepare query
ui.getQueryState().setSelectedCorpora(Sets.newHashSet("pcc2"));
ui.getQueryState().getAql().setValue("tok=\"Feigenblatt\"");
// Click on the "More" button and then "Export"
PopupButton moreButton = _get(PopupButton.class, spec -> spec.withCaption("More"));
moreButton.setPopupVisible(true);
_click(_get(Button.class, spec -> spec.withCaption("Export")));
// Make sure the Export tab is there
ExportPanel panel = _get(ExportPanel.class);
// The download button should be disabled
Button downloadButton = _get(panel, Button.class, spec -> spec.withCaption("Download"));
assertFalse(downloadButton.isEnabled());
// Click on "Perform Export" button, wait until export is finished and download button is
// enabled
_click(_get(panel, Button.class, spec -> spec.withCaption("Perform Export")));
TestHelper.awaitCondition(30, downloadButton::isEnabled);
}
Aggregations