Browse Source

Eliminate disallowed characters in test debug IDs

This fixes the test CustomDateFormats for Vaadin 7.2, where the
set of allowed characters is narrower than in 7.1.

Change-Id: Ife8418aa589914eff665e47fa95c4353bcdb2aff
tags/7.2.0.beta1
Henri Sara 10 years ago
parent
commit
44f3ea58cd

+ 3
- 3
uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html View File

@@ -292,7 +292,7 @@
</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>
@@ -363,12 +363,12 @@
</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>

+ 2
- 0
uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java View 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 + "-";
}

Loading…
Cancel
Save