Skip to content

Commit

Permalink
Fixing failing tests, eclipse-archived#2075
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Dockal <odockal@redhat.com>
  • Loading branch information
odockal committed May 12, 2020
1 parent e2ba154 commit a365b5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.eclipse.reddeer.swt.condition.ShellIsAvailable;
import org.eclipse.reddeer.swt.impl.button.FinishButton;
import org.eclipse.reddeer.swt.impl.button.NextButton;
import org.eclipse.reddeer.swt.impl.combo.DefaultCombo;
import org.eclipse.reddeer.swt.impl.combo.LabeledCombo;
import org.eclipse.reddeer.swt.impl.list.DefaultList;
import org.eclipse.reddeer.swt.impl.menu.ContextMenuItem;
import org.eclipse.reddeer.swt.impl.shell.DefaultShell;
Expand Down Expand Up @@ -66,6 +68,7 @@ public static void createTestProject() {
new DefaultShell("Add Library");
new DefaultList().select("JUnit");
new NextButton().click();
new DefaultCombo().setSelection("JUnit 4");
new FinishButton().click();
new WaitWhile(new ShellIsAvailable("Add Library"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ public void removeEditorTest() {
public void getAssociatedEditorsTest() {
prefPage.selectFileType("*.html");
List<String> associatedEditors = prefPage.getAssociatedEditors();
assertEquals("There should be 3 associated editors to *.html", 3, associatedEditors.size());
assertEquals("There should be 3 associated editors to *.html", 4, associatedEditors.size());
}

@Test
public void getAssociatedEditorsForFileTypeTest() {
List<String> associatedEditors = prefPage.getAssociatedEditorForFileType("*.html");
assertEquals("There should be 3 associated editors to *.html", 3, associatedEditors.size());
assertEquals("There should be 3 associated editors to *.html", 4, associatedEditors.size());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.reddeer.common.wait.AbstractWait;
import org.eclipse.reddeer.common.wait.TimePeriod;
import org.eclipse.reddeer.eclipse.test.Activator;
import org.eclipse.reddeer.eclipse.ui.views.log.LogMessage;
import org.eclipse.reddeer.eclipse.ui.views.log.LogView;
Expand Down Expand Up @@ -98,7 +100,7 @@ public void getOKMessage(){

//test OK Message no.2
assertTrue(messageIsAvailable(messages, IStatus.OK, OK_ID_2,
OK_MESSAGE_2, OK_STACK_2));
OK_MESSAGE_2, OK_STACK_2));
}

@Test
Expand Down Expand Up @@ -198,6 +200,7 @@ private boolean messageIsAvailable(List<LogMessage> messages, int severity, Stri
@After
public void cleanup() {
Platform.getLogFileLocation().toFile().delete();
AbstractWait.sleep(TimePeriod.getCustom(3));
}

}

0 comments on commit a365b5a

Please sign in to comment.