Skip to content

Commit 21b6ca7

Browse files
vaadin-botcaalador
andauthored
fix: clean default system error messages (#12951) (#12974)
Fixes #12939 Co-authored-by: caalador <mikael.grankvist@vaadin.com>
1 parent b9aee76 commit 21b6ca7

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

flow-server/src/main/java/com/vaadin/flow/server/SystemMessages.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,19 @@
3131
* <li><b>sessionExpiredURL</b> = null</li>
3232
* <li><b>sessionExpiredNotificationEnabled</b> = false</li>
3333
* <li><b>sessionExpiredCaption</b> = "Session Expired"</li>
34-
* <li><b>sessionExpiredMessage</b> = "Take note of any unsaved data, and
35-
* <u>click here</u> or press ESC key to continue."</li>
34+
* <li><b>sessionExpiredMessage</b> = "Take note of any unsaved data, and click
35+
* here or press ESC key to continue."</li>
3636
* <li><b>internalErrorURL</b> = null</li>
3737
* <li><b>internalErrorNotificationEnabled</b> = true</li>
3838
* <li><b>internalErrorCaption</b> = "Internal error"</li>
39-
* <li><b>internalErrorMessage</b> = "Please notify the administrator.<br>
40-
* Take note of any unsaved data, and <u>click here</u> or press ESC to
41-
* continue."</li>
39+
* <li><b>internalErrorMessage</b> = "Please notify the administrator. Take note
40+
* of any unsaved data, and click here or press ESC to continue."</li>
4241
* <li><b>cookiesDisabledURL</b> = null</li>
4342
* <li><b>cookiesDisabledNotificationEnabled</b> = true</li>
4443
* <li><b>cookiesDisabledCaption</b> = "Cookies disabled"</li>
4544
* <li><b>cookiesDisabledMessage</b> = "This application requires cookies to
46-
* function.<br>
47-
* Please enable cookies in your browser and <u>click here</u> or press ESC to
48-
* try again.</li>
45+
* function. Please enable cookies in your browser and click here or press ESC
46+
* to try again.</li>
4947
* </ul>
5048
*
5149
* @since 1.0
@@ -54,17 +52,17 @@ public class SystemMessages implements Serializable {
5452
protected String sessionExpiredURL = null;
5553
protected boolean sessionExpiredNotificationEnabled = false;
5654
protected String sessionExpiredCaption = "Session Expired";
57-
protected String sessionExpiredMessage = "Take note of any unsaved data, and <u>click here</u> or press ESC key to continue.";
55+
protected String sessionExpiredMessage = "Take note of any unsaved data, and click here or press ESC key to continue.";
5856

5957
protected String internalErrorURL = null;
6058
protected boolean internalErrorNotificationEnabled = true;
6159
protected String internalErrorCaption = "Internal error";
62-
protected String internalErrorMessage = "Please notify the administrator.<br>Take note of any unsaved data, and <u>click here</u> or press ESC to continue.";
60+
protected String internalErrorMessage = "Please notify the administrator. Take note of any unsaved data, and click here or press ESC to continue.";
6361

6462
protected String cookiesDisabledURL = null;
6563
protected boolean cookiesDisabledNotificationEnabled = true;
6664
protected String cookiesDisabledCaption = "Cookies disabled";
67-
protected String cookiesDisabledMessage = "This application requires cookies to function.<br>Please enable cookies in your browser and <u>click here</u> or press ESC to try again.";
65+
protected String cookiesDisabledMessage = "This application requires cookies to function. Please enable cookies in your browser and click here or press ESC to try again.";
6866

6967
/**
7068
* Private constructor

flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/LogoutIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setLocationWithNotificationDisabled_noErrorMessages() {
3434
// Strings defined in com.vaadin.flow.server.SystemMessages
3535
checkLogsForErrors(
3636
msg -> msg.contains("Session Expired") || msg.contains(
37-
"Take note of any unsaved data, and <u>click here</u> or press ESC key to continue."));
37+
"Take note of any unsaved data, and click here or press ESC key to continue."));
3838

3939
// There can't be any error dialog
4040
Assert.assertFalse(isElementPresent(By.className("v-system-error")));

flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/LogoutWithNotificationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public void setLocationWithNotificationEnabled_noErrorMessages() {
3939
// There can be "Session Expired" message because of heartbeat
4040
// Strings defined in com.vaadin.flow.server.SystemMessages
4141
checkLogsForErrors(msg -> msg.contains("Session Expired")
42-
|| msg.contains("Take note of any unsaved data, and <u>click "
43-
+ "here</u> or press ESC key to continue."));
42+
|| msg.contains("Take note of any unsaved data, and click "
43+
+ "here or press ESC key to continue."));
4444

4545
// There can't be any error dialog
4646
Assert.assertFalse(isElementPresent(By.className("v-system-error")));

0 commit comments

Comments
 (0)