Marcoil has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/164391

Change subject: Move rt-server summary text to a partial
......................................................................

Move rt-server summary text to a partial

This will allow other users (like the visualdiff test server) to
change the text by providing their own partial.

Change-Id: I3c748bc03945e54b9765c2439f5293e222136da1
---
M tests/server/server.parsoid_rt.js
A tests/server/views/index-summary.html
M tests/server/views/index.html
3 files changed, 13 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/91/164391/1

diff --git a/tests/server/server.parsoid_rt.js 
b/tests/server/server.parsoid_rt.js
index 703467d..a6626f1 100644
--- a/tests/server/server.parsoid_rt.js
+++ b/tests/server/server.parsoid_rt.js
@@ -1,6 +1,7 @@
 "use strict";
 
-var RH = require("./render.helpers.js").RenderHelpers;
+var RH = require("./render.helpers.js").RenderHelpers,
+       fs = require('fs');
 
 var dbPagesWithRTSelserErrors =
        'SELECT pages.title, pages.prefix, commits.hash, ' +
@@ -233,6 +234,8 @@
 
        // Pages with rt selser errors
        app.get(/^\/rtselsererrors\/([^\/]+)(?:\/(\d+))?$/, GET_rtselsererrors);
+
+       hbs.registerPartial('summary', fs.readFileSync(__dirname + 
'/views/index-summary.html', 'utf8'));
 }
 
 if (typeof module === "object") {
diff --git a/tests/server/views/index-summary.html 
b/tests/server/views/index-summary.html
new file mode 100644
index 0000000..4f80350
--- /dev/null
+++ b/tests/server/views/index-summary.html
@@ -0,0 +1,8 @@
+<p>
+       We have run roundtrip-tests on <b>{{results.tests}}</b> articles, of 
which
+</p>
+<ul>
+       <li><b>{{results.noErrors}}%</b> parsed without errors,</li>
+       <li><b>{{results.syntacticDiffs}}%</b> round-tripped without semantic 
differences, and</li>
+       <li><b>{{results.perfects}}%</b> round-tripped with no character 
differences at all.</li>
+</ul>
diff --git a/tests/server/views/index.html b/tests/server/views/index.html
index 1e2904c..4df5c8b 100644
--- a/tests/server/views/index.html
+++ b/tests/server/views/index.html
@@ -1,11 +1,4 @@
-<p>
-       We have run roundtrip-tests on <b>{{results.tests}}</b> articles, of 
which
-</p>
-<ul>
-       <li><b>{{results.noErrors}}%</b> parsed without errors,</li>
-       <li><b>{{results.syntacticDiffs}}%</b> round-tripped without semantic 
differences, and</li>
-       <li><b>{{results.perfects}}%</b> round-tripped with no character 
differences at all.</li>
-</ul>
+{{> summary}}
 
 <table id='graph'>
        <tbody>

-- 
To view, visit https://gerrit.wikimedia.org/r/164391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c748bc03945e54b9765c2439f5293e222136da1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to