Skip to content

Commit

Permalink
fix: clean default system error messages
Browse files Browse the repository at this point in the history
Fixes #12939
  • Loading branch information
caalador committed Feb 8, 2022
1 parent 719a8a6 commit dd41551
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@
* <li><b>sessionExpiredNotificationEnabled</b> = false</li>
* <li><b>sessionExpiredCaption</b> = "Session Expired"</li>
* <li><b>sessionExpiredMessage</b> = "Take note of any unsaved data, and
* <u>click here</u> or press ESC key to continue."</li>
* click here or press ESC key to continue."</li>
* <li><b>internalErrorURL</b> = null</li>
* <li><b>internalErrorNotificationEnabled</b> = true</li>
* <li><b>internalErrorCaption</b> = "Internal error"</li>
* <li><b>internalErrorMessage</b> = "Please notify the administrator.<br>
* Take note of any unsaved data, and <u>click here</u> or press ESC to
* <li><b>internalErrorMessage</b> = "Please notify the administrator.
* Take note of any unsaved data, and click here or press ESC to
* continue."</li>
* <li><b>cookiesDisabledURL</b> = null</li>
* <li><b>cookiesDisabledNotificationEnabled</b> = true</li>
* <li><b>cookiesDisabledCaption</b> = "Cookies disabled"</li>
* <li><b>cookiesDisabledMessage</b> = "This application requires cookies to
* function.<br>
* Please enable cookies in your browser and <u>click here</u> or press ESC to
* function.
* Please enable cookies in your browser and click here or press ESC to
* try again.</li>
* </ul>
*
Expand All @@ -54,17 +54,17 @@ public class SystemMessages implements Serializable {
protected String sessionExpiredURL = null;
protected boolean sessionExpiredNotificationEnabled = false;
protected String sessionExpiredCaption = "Session Expired";
protected String sessionExpiredMessage = "Take note of any unsaved data, and <u>click here</u> or press ESC key to continue.";
protected String sessionExpiredMessage = "Take note of any unsaved data, and click here or press ESC key to continue.";

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

protected String cookiesDisabledURL = null;
protected boolean cookiesDisabledNotificationEnabled = true;
protected String cookiesDisabledCaption = "Cookies disabled";
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.";
protected String cookiesDisabledMessage = "This application requires cookies to function. Please enable cookies in your browser and click here or press ESC to try again.";

/**
* Private constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void setLocationWithNotificationDisabled_noErrorMessages() {
// Strings defined in com.vaadin.flow.server.SystemMessages
checkLogsForErrors(
msg -> msg.contains("Session Expired") || msg.contains(
"Take note of any unsaved data, and <u>click here</u> or press ESC key to continue."));
"Take note of any unsaved data, and click here or press ESC key to continue."));

// There can't be any error dialog
Assert.assertFalse(isElementPresent(By.className("v-system-error")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public void setLocationWithNotificationEnabled_noErrorMessages() {
// There can be "Session Expired" message because of heartbeat
// Strings defined in com.vaadin.flow.server.SystemMessages
checkLogsForErrors(msg -> msg.contains("Session Expired")
|| msg.contains("Take note of any unsaved data, and <u>click "
+ "here</u> or press ESC key to continue."));
|| msg.contains("Take note of any unsaved data, and click "
+ "here or press ESC key to continue."));

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

0 comments on commit dd41551

Please sign in to comment.