Difference between revisions of "Javascript testing"

From relax wiki
Jump to navigation Jump to search
(Documented the tests a little better.)
(More documentation.)
Line 1: Line 1:
 +
__TOC__
 
== mw-testing test ==
 
== mw-testing test ==
  
Line 7: Line 8:
 
</pre>
 
</pre>
  
The javascript test function should replace this with "This is test HTML":
+
The javascript test function should replace this with "This is test HTML".  The text "XYZ" should not be seen:
  
 
<div id="mw-testing">XYZ</div>
 
<div id="mw-testing">XYZ</div>
  
 
=== A second text ===
 
=== A second text ===
 +
 +
The code is:
  
 
<pre>
 
<pre>
 
<div class="mw-testing2">ABC</div>
 
<div class="mw-testing2">ABC</div>
 
</pre>
 
</pre>
 +
 +
The result:
  
 
<div class="mw-testing2">ABC</div>
 
<div class="mw-testing2">ABC</div>
Line 22: Line 27:
 
== NavFrame test ==
 
== NavFrame test ==
  
 +
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 <nowiki>[hide]</nowiki> and <nowiki>[show]</nowiki> links to the right of the titles.
 +
 +
=== Expanded ===
 +
 +
This should be an expanded NavFrame div box.  The code is:
 +
<pre>
 +
<div class="NavFrame">
 +
<div class="NavHead">'''Title 1'''</div>
 +
<div class="NavContent">
 +
Hello world.
 +
</div>
 +
</div>
 +
</pre>
 +
 +
The result is:
 
<div class="NavFrame">
 
<div class="NavFrame">
 
<div class="NavHead">'''Title 1'''</div>
 
<div class="NavHead">'''Title 1'''</div>
Line 29: Line 49:
 
</div>
 
</div>
  
 +
=== Collapsed ===
 +
 +
This should be a collapsed NavFrame div box.  The code is:
 +
<pre>
 +
<div class="NavFrame">
 +
<div class="NavHead">'''Title 2'''</div>
 +
<div class="NavContent" style="display: none;">
 +
Hello world.
 +
</div>
 +
</div>
 +
</pre>
  
 +
The result is:
 
<div class="NavFrame">
 
<div class="NavFrame">
 
<div class="NavHead">'''Title 2'''</div>
 
<div class="NavHead">'''Title 2'''</div>

Revision as of 13:15, 19 October 2015

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-testing2">ABC</div>

The result:

ABC


NavFrame test

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:

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: