From 44f3ea58cd7bdca7e25d92b6c411da58d9928e6c Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Fri, 21 Mar 2014 11:01:20 +0200 Subject: 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 --- .../com/vaadin/tests/components/datefield/CustomDateFormats.html | 6 +++--- .../com/vaadin/tests/components/datefield/CustomDateFormats.java | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'uitest') diff --git a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html index 1acdded4cb..b20e7295f7 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html +++ b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.html @@ -292,7 +292,7 @@ assertValue - vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_Syyyy'年'M'月'd'日'/domChild[0] + vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_Syyyy'X'M'X'd'X'/domChild[0] 2010年2月1日 @@ -363,12 +363,12 @@ assertValue - vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMMM d, yyyy/domChild[0] + vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMMM dX yyyy/domChild[0] February 1, 2010 assertValue - vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMM d, yyyy/domChild[0] + vaadin=runcomvaadintestscomponentsdatefieldCustomDateFormats::PID_SMMM dX yyyy/domChild[0] Feb 1, 2010 diff --git a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java index 015a974b3e..77637fb339 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java +++ b/uitest/src/com/vaadin/tests/components/datefield/CustomDateFormats.java @@ -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 + "-"; } -- cgit v1.2.3