From 513f0b410044386e65d537c0e7610a31eba495a0 Mon Sep 17 00:00:00 2001 From: Simon Harrer Date: Sun, 31 Jan 2016 23:35:11 +0100 Subject: [PATCH] asf --- build.gradle | 2 +- .../java/net/sf/jabref/gui/GUITest.java | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index b7f3fe6530d..73aa588c3d4 100644 --- a/build.gradle +++ b/build.gradle @@ -103,7 +103,7 @@ dependencies { testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:1.10.19' - integrationTestCompile 'org.assertj:assertj-swing-junit:3.0.2' + testCompile 'org.assertj:assertj-swing-junit:3.0.2' compile 'org.jsoup:jsoup:1.8.3' compile 'com.mashape.unirest:unirest-java:1.4.7' diff --git a/src/integrationTest/java/net/sf/jabref/gui/GUITest.java b/src/integrationTest/java/net/sf/jabref/gui/GUITest.java index 1c01dadfbef..b0b378695ac 100644 --- a/src/integrationTest/java/net/sf/jabref/gui/GUITest.java +++ b/src/integrationTest/java/net/sf/jabref/gui/GUITest.java @@ -24,11 +24,15 @@ protected void onSetUp() { awtExceptionHandler = new AWTExceptionHandler(); awtExceptionHandler.installExceptionDetectionInEDT(); application(JabRefMain.class).start(); + + robot().settings().timeoutToFindSubMenu(1_000); } + + @Test public void testExit() { - FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10000).using(robot()); + FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10_000).using(robot()); Pause.pause(1_000); exitJabRef(mainFrame); } @@ -40,7 +44,7 @@ private void exitJabRef(FrameFixture mainFrame) { @Test public void testNewFile() { - FrameFixture mainFrame = findFrame(JabRefFrame.class).using(robot()); + FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10_000).using(robot()); newDatabase(mainFrame); mainFrame.menuItemWithPath("File", "Close database").click(); @@ -53,12 +57,12 @@ private void newDatabase(FrameFixture mainFrame) { @Test public void testCreateBibtexEntry() { - FrameFixture mainFrame = findFrame(JabRefFrame.class).using(robot()); + FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10_000).using(robot()); newDatabase(mainFrame); mainFrame.menuItemWithPath("BibTeX", "New entry").click(); - findDialog(EntryTypeDialog.class).using(robot()).button(new GenericTypeMatcher(JButton.class) { + findDialog(EntryTypeDialog.class).withTimeout(10_000).using(robot()).button(new GenericTypeMatcher(JButton.class) { @Override protected boolean isMatching(@Nonnull JButton jButton) { return "Book".equals(jButton.getText()); @@ -70,10 +74,10 @@ public void testCreateBibtexEntry() { @Test public void testOpenAndSavePreferences() { - FrameFixture mainFrame = findFrame(JabRefFrame.class).using(robot()); + FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10_000).using(robot()); mainFrame.menuItemWithPath("Options", "Preferences").click(); - findDialog(PreferencesDialog.class).using(robot()).button(new GenericTypeMatcher(JButton.class) { + findDialog(PreferencesDialog.class).withTimeout(10_000).using(robot()).button(new GenericTypeMatcher(JButton.class) { @Override protected boolean isMatching(@Nonnull JButton jButton) { return "OK".equals(jButton.getText()); @@ -85,7 +89,7 @@ public void testOpenAndSavePreferences() { @Test public void testViewChanges() { - FrameFixture mainFrame = findFrame(JabRefFrame.class).using(robot()); + FrameFixture mainFrame = findFrame(JabRefFrame.class).withTimeout(10_000).using(robot()); newDatabase(mainFrame);