Difference between revisions of "Javascript testing"
Jump to navigation
Jump to search
Bugman admin (talk | contribs) (Added an intro sentence.) |
Bugman admin (talk | contribs) (→A second text: Fix for the test.) |
||
Line 19: | Line 19: | ||
<pre> | <pre> | ||
− | <div class="mw- | + | <div class="mw-testing">ABC</div> |
</pre> | </pre> | ||
The result: | The result: | ||
− | <div class="mw- | + | <div class="mw-testing">ABC</div> |
− | |||
== NavFrame test == | == NavFrame test == |
Revision as of 13:17, 19 October 2015
This is for testing the javascript from MediaWiki:Common.js.
mw-testing test
The following is:
<div id="mw-testing">XYZ</div>
The javascript test function should replace this with "This is test HTML". The text "XYZ" should not be seen:
XYZ
A second text
The code is:
<div class="mw-testing">ABC</div>
The result:
ABC
These examples are copied and pasted from https://www.mediawiki.org/wiki/Manual:Collapsible_elements#NavFrame. These tests demonstrate the absence of the javascript processing which adds the [hide] and [show] links to the right of the titles.
Expanded
This should be an expanded NavFrame div box. The code is:
<div class="NavFrame"> <div class="NavHead">'''Title 1'''</div> <div class="NavContent"> Hello world. </div> </div>
The result is:
Title 1
Hello world.
Collapsed
This should be a collapsed NavFrame div box. The code is:
<div class="NavFrame"> <div class="NavHead">'''Title 2'''</div> <div class="NavContent" style="display: none;"> Hello world. </div> </div>
The result is:
Title 2