Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 686ddb1

Browse files
committed
Removed workaround
Signed-off-by: Oleksii Korniienko <olkornii@redhat.com>
1 parent 4cffe6a commit 686ddb1

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

tests/org.eclipse.reddeer.ui.test/src/org/eclipse/reddeer/ui/test/run/RedDeerTestClassRunMenuOptionsTest.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,19 @@ public void testContextMenu() {
5151
project.getProjectItem(EXAMPLE_TEST_CLASS_PATH).select();
5252

5353
try {
54-
try {
55-
new ContextMenuItem(new DefaultTree(),
56-
new WithTextMatcher(new RegexMatcher(".*Run As.*")),
57-
new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*"))); // if it's the first run
58-
} catch (CoreLayerException e) { // Launch configuration create with the same NAME as FILE NAME after first run
59-
new ContextMenuItem(new DefaultTree(),
60-
new WithTextMatcher(new RegexMatcher(".*Run As.*")),
61-
new WithTextMatcher(new RegexMatcher(".*"+ EXAMPLE_TEST_CLASS_NAME + ".*"))); // if the launch configuration exists
62-
}
54+
new ContextMenuItem(new DefaultTree(),
55+
new WithTextMatcher(new RegexMatcher(".*Run As.*")),
56+
new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*")));
6357
} catch (CoreLayerException exc) {
64-
fail("ContextMenuItem Run As -> RedDeer Test (" + EXAMPLE_TEST_CLASS_NAME + ") is missing");
58+
fail("ContextMenuItem Run As -> RedDeer Test is missing");
6559
}
60+
6661
try {
6762
new ContextMenuItem(new DefaultTree(),
68-
new WithTextMatcher(new RegexMatcher(".*Debug As.*")),
69-
new WithTextMatcher(new RegexMatcher(".*"+ EXAMPLE_TEST_CLASS_NAME + ".*")));
63+
new WithTextMatcher(new RegexMatcher(".*Debug As.*")),
64+
new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*")));
7065
} catch (CoreLayerException exc) {
71-
fail("ContextMenuItem Debug As -> RedDeer Test (" + EXAMPLE_TEST_CLASS_NAME + ") is missing");
66+
fail("ContextMenuItem Debug As -> RedDeer Test is missing");
7267
}
7368
}
7469

0 commit comments

Comments
 (0)