diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js
index 2a613ebf0..26abfd2c8 100644
--- a/tests/backend/specs/api/pad.js
+++ b/tests/backend/specs/api/pad.js
@@ -14,7 +14,19 @@ var apiVersion = 1;
var testPadId = makeid();
var lastEdited = "";
var text = generateLongText();
-var ULhtml = '
';
+
+/*
+ * Html document with nested lists of different types, to test its import and
+ * verify it is exported back correctly
+ */
+var ulHtml = '- item
- item1
- item2
';
+
+/*
+ * When exported back, Etherpad produces an html which is not exactly the same
+ * textually, but at least it remains standard compliant and has an equal DOM
+ * structure.
+ */
+var expectedHtml = '- item
- item1
- item2
';
describe('Connectivity', function(){
it('errors if can not connect', function(done) {
@@ -522,8 +534,8 @@ describe('setHTML', function(){
})
describe('setHTML', function(){
- it('Sets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
- api.get(endPoint('setHTML')+"&padID="+testPadId+"&html="+ULhtml)
+ it('Sets the HTML of a Pad with complex nested lists of different types', function(done) {
+ api.get(endPoint('setHTML')+"&padID="+testPadId+"&html="+ulHtml)
.expect(function(res){
if(res.body.code !== 0) throw new Error("List HTML cant be imported")
})
@@ -533,12 +545,22 @@ describe('setHTML', function(){
})
describe('getHTML', function(){
- it('Gets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
+ it('Gets back the HTML of a Pad with complex nested lists of different types', function(done) {
api.get(endPoint('getHTML')+"&padID="+testPadId)
.expect(function(res){
- var ehtml = res.body.data.html.replace("