Testing the error status display of the HtmlEditor
When the HtmlEditor has an error message it should show its error status. This by default means that it should show with a reddish background. The reddish background is usually done by adding the css class ui-input-err to the DOM element.
This page has two HtmlEditor controls, both set to "mandatory". The validate button just calls bindErrors(), so that should cause that red second control.
In addition, when the page is refreshed (F5) that thing should again be red.
The test written for this can be found in ITHtmlEditorComponentTest, and works as follows:
- The screen is opened as usual, and the validate button is clicked in the test.
- The test then obtains the rendered area of the control from the test browser.
- It then creates a histogram of the colors used, and tests that the most often used color is reddish.
If this works the tests refreshes the page, and then does the same test.