use of org.assertj.swing.fixture.DialogFixture in project jabref by JabRef.
the class GUITest method testDatabasePropertiesDialog.
@Test
public void testDatabasePropertiesDialog() throws IOException {
newDatabase();
mainFrame.menuItemWithPath("File", "Library properties").click();
robot().waitForIdle();
DialogFixture databasePropertiesDialog = findDialog(DatabasePropertiesDialog.class).withTimeout(10_000).using(robot());
takeScreenshot(databasePropertiesDialog, "DatabasePropertiesDialog");
databasePropertiesDialog.button(new GenericTypeMatcher<JButton>(JButton.class) {
@Override
protected boolean isMatching(@Nonnull JButton jButton) {
return "OK".equals(jButton.getText());
}
}).click();
closeDatabase();
exitJabRef();
}
use of org.assertj.swing.fixture.DialogFixture in project jabref by JabRef.
the class GUITest method testOpenAndSavePreferences.
@Test
public void testOpenAndSavePreferences() throws IOException {
mainFrame.menuItemWithPath("Options", "Preferences").click();
robot().waitForIdle();
DialogFixture preferencesDialog = findDialog(PreferencesDialog.class).withTimeout(10_000).using(robot());
takeScreenshot(preferencesDialog, "PreferencesDialog");
preferencesDialog.button(new GenericTypeMatcher<JButton>(JButton.class) {
@Override
protected boolean isMatching(@Nonnull JButton jButton) {
return "OK".equals(jButton.getText());
}
}).click();
exitJabRef();
}
Aggregations