Skip to content

Commit

Permalink
asf
Browse files Browse the repository at this point in the history
  • Loading branch information
simonharrer committed Feb 10, 2016
1 parent f0f22c5 commit 513f0b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
18 changes: 11 additions & 7 deletions src/integrationTest/java/net/sf/jabref/gui/GUITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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();
Expand All @@ -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>(JButton.class) {
findDialog(EntryTypeDialog.class).withTimeout(10_000).using(robot()).button(new GenericTypeMatcher<JButton>(JButton.class) {

@Override protected boolean isMatching(@Nonnull JButton jButton) {
return "Book".equals(jButton.getText());
Expand All @@ -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>(JButton.class) {
findDialog(PreferencesDialog.class).withTimeout(10_000).using(robot()).button(new GenericTypeMatcher<JButton>(JButton.class) {

@Override protected boolean isMatching(@Nonnull JButton jButton) {
return "OK".equals(jButton.getText());
Expand All @@ -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);

Expand Down

0 comments on commit 513f0b4

Please sign in to comment.