Add tests for processing HTML parameters in commands

Registered by Balazs Ree

The target of the tests is to check if a given HTML can be inserted from the server to the page. The tests decide the correctness of the operation by checking what appears on the page as a result. This way the entire process is checked. At the moment this is possible with selenium tests.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Balazs Ree
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
Accepted for 1.5
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

The target of the tests is to check if a given HTML can be inserted from the server to the page. The tests decide the correctness of the operation by checking what appears on the page as a result. This way the entire process is checked. At the moment this is possible with selenium tests.

These tests do not need to check the actual payload, that is an internal issue of kss. This means that whatever processing we use for getting the HTML inserted in the DOM, these tests mut pass the same. (However unittests that check the payload of a command will fail and need to be adjusted, but this is a separate issue.)

The following different cases of content need be checked.

• simple correct SGML that passes

• SGML: more nodes, with text nodes before and after, like "text <b>bold</b> and more <b>bold</b> works". This should be tested to work with both replaceInnerHTML and replaceHTML.

• SGML: unclosed tags (<p> <p> <p> without </p>)

• SGML: tags that need no closing or by default closed (<input>, <br/>, <br> without </br>)

• SGML edge cases: table in a table

• SGML edge cases: table row inserted in itself (gets appended to a table in the page)

• SGML edge cases: <form> inside the <p> (does close <p> before the form)

• transitional XHTML 4: namespace attributes like <p kss-attr:foo="bar"> do work (this is what makes the page invalid in transitional mode but it actually works just as well as in real XHTML)

• Raw utf8 characters from latin1 (add example...) and latin2 charsets (árvíztűrő tükörfúrógép) in text and in attributes do work

• numbered XHTML character references like &#34; (quot), &#38; (amp), &#60; (lt), &#62; (gt), &#160; (nbsp), &#225; (aacute) or &#369; (udblac) in text, and in attributes, do work

• named HTML character references like &quot; &amp; &lt; &gt; &nbsp &aacute; &udblac; in text, and in attributes do work

• (?) named xhtml tags like <kss:whatever> This is something we have not used and it may be a bad idea anyway. Currently we have cases to add markup inside response headers so I doubt if we ever want to do this within the page. However in strict HTMLL is is valid so it may be good to test for this since some special application may use this.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.