diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js
index b2b31c96d..45e88e422 100644
--- a/tests/backend/specs/api/pad.js
+++ b/tests/backend/specs/api/pad.js
@@ -11,6 +11,7 @@ apiKey = apiKey.replace(/\n$/, "");
var apiVersion = 1;
var testPadId = makeid();
var lastEdited = "";
+var ULhtml = '
';
describe('Connectivity', function(){
it('errors if can not connect', function(done) {
@@ -62,7 +63,7 @@ describe('Permission', function(){
-> getLastEdited(padID) -- Should be when setText was performed
-> padUsers(padID) -- Should be when setText was performed
-> setHTML(padID) -- Should fail on invalid HTML
- -> setHTML(padID) -- Should fail on invalid HTML
+ -> setHTML(padID) *3 -- Should fail on invalid HTML
-> getHTML(padID) -- Should return HTML close to posted HTML
*/
@@ -294,8 +295,7 @@ describe('setHTML', function(){
describe('setHTML', function(){
it('Sets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
- var html = "
";
- api.get(endPoint('setHTML')+"&padID=test&html="+html)
+ api.get(endPoint('setHTML')+"&padID=test&html="+ULhtml)
.expect(function(res){
if(res.body.code !== 0) throw new Error("List HTML cant be imported")
})
@@ -304,6 +304,31 @@ describe('setHTML', function(){
});
})
+describe('getHTML', function(){
+ // will fail due to https://github.com/ether/etherpad-lite/issues/1604
+ // reminder to self this is how the HTML looks
+ //
+ //
+ //
+ // It will look right in the browser but the export will get it horriby wrong
+
+ it('Gets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
+ api.get(endPoint('getHTML')+"&padID=test")
+ .expect(function(res){
+ console.log(res.body.data.html);
+ if(res.body.data !== ULhtml) throw new Error("Imported HTML does not match served HTML")
+ })
+ .expect('Content-Type', /json/)
+ .expect(200, done)
+ });
+})
var endPoint = function(point){