From 686ddb124c777d714b2d56fde8a764157225415d Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Tue, 23 May 2023 13:56:51 +0200 Subject: [PATCH] Removed workaround Signed-off-by: Oleksii Korniienko --- .../RedDeerTestClassRunMenuOptionsTest.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/org.eclipse.reddeer.ui.test/src/org/eclipse/reddeer/ui/test/run/RedDeerTestClassRunMenuOptionsTest.java b/tests/org.eclipse.reddeer.ui.test/src/org/eclipse/reddeer/ui/test/run/RedDeerTestClassRunMenuOptionsTest.java index 2b9e8f691..744e49a55 100644 --- a/tests/org.eclipse.reddeer.ui.test/src/org/eclipse/reddeer/ui/test/run/RedDeerTestClassRunMenuOptionsTest.java +++ b/tests/org.eclipse.reddeer.ui.test/src/org/eclipse/reddeer/ui/test/run/RedDeerTestClassRunMenuOptionsTest.java @@ -51,24 +51,19 @@ public void testContextMenu() { project.getProjectItem(EXAMPLE_TEST_CLASS_PATH).select(); try { - try { - new ContextMenuItem(new DefaultTree(), - new WithTextMatcher(new RegexMatcher(".*Run As.*")), - new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*"))); // if it's the first run - } catch (CoreLayerException e) { // Launch configuration create with the same NAME as FILE NAME after first run - new ContextMenuItem(new DefaultTree(), - new WithTextMatcher(new RegexMatcher(".*Run As.*")), - new WithTextMatcher(new RegexMatcher(".*"+ EXAMPLE_TEST_CLASS_NAME + ".*"))); // if the launch configuration exists - } + new ContextMenuItem(new DefaultTree(), + new WithTextMatcher(new RegexMatcher(".*Run As.*")), + new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*"))); } catch (CoreLayerException exc) { - fail("ContextMenuItem Run As -> RedDeer Test (" + EXAMPLE_TEST_CLASS_NAME + ") is missing"); + fail("ContextMenuItem Run As -> RedDeer Test is missing"); } + try { new ContextMenuItem(new DefaultTree(), - new WithTextMatcher(new RegexMatcher(".*Debug As.*")), - new WithTextMatcher(new RegexMatcher(".*"+ EXAMPLE_TEST_CLASS_NAME + ".*"))); + new WithTextMatcher(new RegexMatcher(".*Debug As.*")), + new WithTextMatcher(new RegexMatcher(".*RedDeer Test.*"))); } catch (CoreLayerException exc) { - fail("ContextMenuItem Debug As -> RedDeer Test (" + EXAMPLE_TEST_CLASS_NAME + ") is missing"); + fail("ContextMenuItem Debug As -> RedDeer Test is missing"); } }