Add css to have dl/dt/dd show as numbered list for testcases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu QA Website |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Currently, the normal testcase format [1] suggests users should use nested ordered lists. There is a few problems with the current format though:
1) The markup is not clean; it's quite laborious to read the markup, even if you do that much
2) The markup is invalid; there can never be anything else inside an <ol> than <li>
Even with 2 fixed, 1 stays, even more so. The valid markup would be:
<ol>
<li title="
<ol><li title="
</li><!-- ends "action" li! -->
<li title="
<ol><li title="
</li><!-- ends "action" li! -->
</ol>
My proposed solution is to use definition lists. While some might argue it's semantically a little less correct, it's correct whatsoever. The valid markup with definition lists would be:
<dl>
<dt>Perform X action</dt>
<dd>Expect Y result</dd>
<dt>Perform A action</dt>
<dd>Expect B and C result</dd>
<dl>
Notice the difference in readability! Also, if we'd use definition lists, we could simply point to dt and dd instead of the classes "action" and "expected_result" too, both simplifying the CSS code as well as definitely cleaning up the markup.
If one wants, they can split expected results to multiple elements too. Simply:
<dl>
<dt>Perform A action</dt>
<dd>Expect B result</dd>
<dd>Expect C result</dd>
</dl>
What about numbering then? We can simply use the internal counters CSS offers us, see article [2], and a simple example found in the article [3] - even nested counters [4] are doable. This does rely on the pseudo-selector :before to be working, but it should do in all modern browsers. Even if it doesn't the list is still readable though.
Naturally, this change needs some CSS code added, but it would greatly improve the current situation. Especially managing the testcases would be easier, since the code would be much more readable.
[1] https:/
[2] http://
[3] http://
[4] http://
Changed in ubuntu-qa-website: | |
status: | Invalid → Triaged |
importance: | Undecided → Wishlist |
summary: |
- Enhance testcase formats + Add css to have dl/dt/dd show as numbered list for testcases |
Changed in ubuntu-qa-website: | |
status: | Fix Committed → Fix Released |
I am in support of this idea, if possible. Stephane if we went this route, I would like to convert the current testcases over to this format.. It shouldn't be too difficult provided we can regex find/replace the testcase text via some sql magic :-) For the moment, I am leaving everything alone so as to not make the conversion anymore difficult. This includes the improper syntax (which otherwise is rendered properly by modern browsers) which is the template default.