Written: 2006-03-22 by MatthewPaulThomas
The Launchpad Web app now supports four kinds of alert messages: error messages, warning messages, informational messages, and debugging data. AddForm, EditForm, and GeneralForm use these automatically, but sometimes you'll have to use them yourself (instead of the old portalError and portalMessage CSS classes).
How to roll your own alerts
|
<p class="error message"> |
|
<p class="warning message"> |
|
<p class="informational message"> |
|
<p class="debugging message"> |
If you want to highlight a form field with an error message underneath, use the classes separately.
<div class="error"> |
Testing that you've used the correct alert style
When you write tests for a page containing an alert message, include the type of alert in the expected output. For example:
...error message... ...There is no product with that name.
...warning message... ...There is no branch with that name. Continuing will register this branch automatically.
...informational message... ...Thank you for your bug report!