aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-09-02 17:26:23 +0200
committerDavid Gageot <david@gageot.net>2015-09-02 17:26:23 +0200
commitfeb61fd1746daa0fdf661875a96fccc9e3967350 (patch)
treee65279321e7c5f2cd7f44f74fc0bd9e6239ed870
parentb2879de7de9b1939f5229e52f0e38d24a28355fa (diff)
downloadsonarqube-feb61fd1746daa0fdf661875a96fccc9e3967350.tar.gz
sonarqube-feb61fd1746daa0fdf661875a96fccc9e3967350.zip
Revert "Better regexp support for Selenium its"
This reverts commit b7d62595b994ba1a78d41a3834418c53f81587ab.
-rw-r--r--it/it-tests/src/test/java/administration/suite/ui/I18nTest.java4
-rw-r--r--it/it-tests/src/test/java/selenium/SeleneseTest.java6
2 files changed, 4 insertions, 6 deletions
diff --git a/it/it-tests/src/test/java/administration/suite/ui/I18nTest.java b/it/it-tests/src/test/java/administration/suite/ui/I18nTest.java
index 13bd5808066..14a9ec84f4d 100644
--- a/it/it-tests/src/test/java/administration/suite/ui/I18nTest.java
+++ b/it/it-tests/src/test/java/administration/suite/ui/I18nTest.java
@@ -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);
}
}
diff --git a/it/it-tests/src/test/java/selenium/SeleneseTest.java b/it/it-tests/src/test/java/selenium/SeleneseTest.java
index d45862843fc..ecd716775fc 100644
--- a/it/it-tests/src/test/java/selenium/SeleneseTest.java
+++ b/it/it-tests/src/test/java/selenium/SeleneseTest.java
@@ -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;
}