]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "Better regexp support for Selenium its"
authorDavid Gageot <david@gageot.net>
Wed, 2 Sep 2015 14:00:25 +0000 (16:00 +0200)
committerDavid Gageot <david@gageot.net>
Wed, 2 Sep 2015 14:00:25 +0000 (16:00 +0200)
This reverts commit aa224322a2accb2b80806d1f294ff0183e87949c.

it/it-tests/src/test/java/administration/suite/ui/I18nTest.java
it/it-tests/src/test/java/selenium/SeleneseTest.java

index 13bd580806658b926ae7ad0b1b201f45c44d8742..14a9ec84f4dd4b0b1df40c6dfea83dd1ea9b9fa0 100644 (file)
@@ -27,7 +27,6 @@ import com.sonar.orchestrator.selenium.Selenese;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
-import selenium.SeleneseTest;
 
 import static util.ItUtils.projectDir;
 
@@ -54,7 +53,8 @@ public class I18nTest {
       "/ui/i18n/french-pack.html",
       "/ui/i18n/locale-with-france-country.html",
       "/ui/i18n/locale-with-swiss-country.html").build();
-    new SeleneseTest(selenese).runOn(orchestrator);
+    // Use the old runner because it fails with the new Selenium runner
+    orchestrator.executeSelenese(selenese);
   }
 
 }
index d45862843fc8f55b012662e2cf699b5ea4fca0fe..ecd716775fc1b99fa3e8ee77a9960e4a170c70f8 100644 (file)
@@ -270,8 +270,7 @@ public class SeleneseTest {
     }
 
     if (pattern.startsWith("regexp:")) {
-      String expectedRegEx = pattern.replaceFirst("regexp:", ".*") + ".*";
-      find(selector).should().match(Pattern.compile(expectedRegEx, Pattern.DOTALL));
+      find(selector).should().match(Pattern.compile(pattern.substring(7)));
       return;
     }
 
@@ -288,8 +287,7 @@ public class SeleneseTest {
     }
 
     if (pattern.startsWith("regexp:")) {
-      String expectedRegEx = pattern.replaceFirst("regexp:", ".*") + ".*";
-      find(selector).should().not().match(Pattern.compile(expectedRegEx, Pattern.DOTALL));
+      find(selector).should().not().match(Pattern.compile(pattern.substring(7)));
       return;
     }