diff --git a/tests/frontend/specs/importexport.js b/tests/frontend/specs/importexport.js
index 5c642ae3..4ba8d57b 100644
--- a/tests/frontend/specs/importexport.js
+++ b/tests/frontend/specs/importexport.js
@@ -140,10 +140,29 @@ describe("import functionality", function(){
expect(results[1][1]).to.be('\t* bullet line 1\n\n\t* bullet line 2\n\t\t* bullet2 line 1\n\n\t\t\t\t* bullet4 line 2 bisu\n\t\t\t\t* bullet4 line 2 bs\n\t\t\t\t* bullet4 line 2 uuis\n\n')
done()
})
-
-
- //RESULT IS WRONG AT THE LAST LINE
- xit("import a pad with 8 levels of bullets and newlines and attributes from html", function(done){
+ it("import a pad with nested bullets from html", function(done){
+ var importurl = helper.padChrome$.window.location.href+'/import'
+ var htmlWithBullets = '
- bullet4 line 2
- bullet4 line 2
- bullet4 line 2
- bullet3 line 1
- bullet2 line 1
'
+ importrequest(htmlWithBullets,importurl,"html")
+ var oldtext=getinnertext()
+ helper.waitFor(function(){
+ return oldtext != getinnertext()
+// return expect(getinnertext()).to.be('\
+//\n\
+//\n\
+//\n\
+//\n\
+//\n\
+//\n\
+//
\n')
+ })
+
+ var results = exportfunc(helper.padChrome$.window.location.href)
+ expect(results[0][1]).to.be('- bullet line 1
- bullet line 2
- bullet2 line 1
- bullet4 line 2
- bullet4 line 2
- bullet4 line 2
- bullet3 line 1
- bullet2 line 1
')
+ expect(results[1][1]).to.be('\t* bullet line 1\n\t* bullet line 2\n\t\t* bullet2 line 1\n\t\t\t\t* bullet4 line 2\n\t\t\t\t* bullet4 line 2\n\t\t\t\t* bullet4 line 2\n\t\t\t* bullet3 line 1\n\t* bullet2 line 1\n\n')
+ done()
+ })
+ it("import a pad with 8 levels of bullets and newlines and attributes from html", function(done){
var importurl = helper.padChrome$.window.location.href+'/import'
var htmlWithBullets = '
bullet4 line 2 bisubullet4 line 2 bs- bullet4 line 2 u
uis
'
importrequest(htmlWithBullets,importurl,"html")
@@ -161,45 +180,11 @@ describe("import functionality", function(){
\n')
})
var results = exportfunc(helper.padChrome$.window.location.href)
- expect(results[0][1]).to.be('
bullet4 line 2 bisubullet4 line 2 bs- bullet4 line 2 u
uis
')
+ expect(results[0][1]).to.be('
bullet4 line 2 bisubullet4 line 2 bs- bullet4 line 2 u
uis
')
expect(results[1][1]).to.be('\t* bullet line 1\n\n\t* bullet line 2\n\t\t* bullet2 line 1\n\n\t\t\t\t* bullet4 line 2 bisu\n\t\t\t\t* bullet4 line 2 bs\n\t\t\t\t* bullet4 line 2 uuis\n\t\t\t\t\t\t\t\t* foo\n\t\t\t\t\t\t\t\t* foobar bs\n\t\t\t\t\t* foobar\n\n')
done()
})
- xit("import a pad with indents from html", function(done){
- var importurl = helper.padChrome$.window.location.href+'/import'
- var htmlWithIndents = '- indent line 1
- indent line 2
- indent2 line 1
- indent2 line 2
'
- importrequest(htmlWithIndents,importurl,"html")
- console.error(getinnertext())
- expect(getinnertext()).to.be('\
-\n\
-\n\
-\n\
-\n\
-
\n')
- var results = exportfunc(helper.padChrome$.window.location.href)
- console.error(results[0][1])
- expect(results[0][1]).to.be('- indent line 1
- indent line 2
- indent2 line 1
- indent2 line 2
')
- expect(results[1][1]).to.be('')
- done()
- })
- xit("import a pad with indented lists and newlines from html", function(done){
- var importurl = helper.padChrome$.window.location.href+'/import'
- var htmlWithIndents = '
'
- importrequest(htmlWithIndents,importurl,"html")
- expect(getinnertext()).to.be('\
-\n\
-
\n\
-\n\
-\n\
-
\n\
-\n\
-
\n')
- var results = exportfunc(helper.padChrome$.window.location.href)
- expect(results[0][1]).to.be('')
- expect(results[1][1]).to.be('')
- done()
- })
xit("import a pad with ordered lists from html", function(done){
var importurl = helper.padChrome$.window.location.href+'/import'
var htmlWithBullets = '- number 1 line 1
- number 2 line 2
'