jenkins-bot has submitted this change and it was merged.
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-rt.html
M tests/server/views/index.html
3 files changed, 13 insertions(+), 9 deletions(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/server/server.parsoid_rt.js
b/tests/server/server.parsoid_rt.js
index 703467d..99164cb 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-rt.html', 'utf8'));
}
if (typeof module === "object") {
diff --git a/tests/server/views/index-summary-rt.html
b/tests/server/views/index-summary-rt.html
new file mode 100644
index 0000000..4f80350
--- /dev/null
+++ b/tests/server/views/index-summary-rt.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: merged
Gerrit-Change-Id: I3c748bc03945e54b9765c2439f5293e222136da1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits