]> source.dussan.org Git - vaadin-framework.git/commitdiff
Eliminate disallowed characters in test debug IDs
authorHenri Sara <hesara@vaadin.com>
Fri, 21 Mar 2014 09:01:20 +0000 (11:01 +0200)
committerVaadin Code Review <review@vaadin.com>
Fri, 21 Mar 2014 09:28:11 +0000 (09:28 +0000)
This fixes the test CustomDateFormats for Vaadin 7.2, where the
set of allowed characters is narrower than in 7.1.

Change-Id: Ife8418aa589914eff665e47fa95c4353bcdb2aff

uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html
uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java

index 1acdded4cbff64f6ecc173161fd836c792fb079a..b20e7295f78027562d4ece8c18177a02f2b00d7b 100644 (file)
 </tr>
 <tr>
        <td>assertValue</td>
-       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_Syyyy'年'M'月'd'日'/domChild[0]</td>
+       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_Syyyy'X'M'X'd'X'/domChild[0]</td>
        <td>2010年2月1日</td>
 </tr>
 <tr>
 </tr>
 <tr>
        <td>assertValue</td>
-       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMMM d, yyyy/domChild[0]</td>
+       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMMM dX yyyy/domChild[0]</td>
        <td>February 1, 2010</td>
 </tr>
 <tr>
        <td>assertValue</td>
-       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMM d, yyyy/domChild[0]</td>
+       <td>vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMM dX yyyy/domChild[0]</td>
        <td>Feb 1, 2010</td>
 </tr>
 <tr>
index 015a974b3e7a107869d2183d90174da99a48f79d..77637fb339c9e3e33e7232af05eae702c7a29d8c 100644 (file)
@@ -147,6 +147,8 @@ public class CustomDateFormats extends TestBase {
         df.setDateFormat(pattern);
         df.setImmediate(true);
         String debugId = pattern.replace('/', 'X');
+        // only certain characters are allowed in debug IDs
+        debugId = debugId.replaceAll("[^-a-zA-Z .'_]", "X");
         while (usedDebugIds.contains(debugId)) {
             debugId = debugId + "-";
         }