Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stefane Fermigier
jio
Commits
91ddd1e8
Commit
91ddd1e8
authored
Aug 07, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xwikistorage tests live tests removed
Live tests should be on a seperate qunit page
parent
0f91cf2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
106 deletions
+0
-106
test/jio.storage/xwikistorage.tests.js
test/jio.storage/xwikistorage.tests.js
+0
-106
No files found.
test/jio.storage/xwikistorage.tests.js
View file @
91ddd1e8
...
...
@@ -318,110 +318,4 @@
return
ret
;
};
if
(
window
.
location
.
href
.
match
(
/xwiki
\/
bin
\/
view/
))
(
function
()
{
// This test will only be run if we are inside of a live XWiki instance.
test
(
"
XWiki Live Server setup
"
,
function
()
{
var
o
=
setUp
(
this
);
o
.
jio
.
stop
();
this
.
sandbox
.
restore
();
o
.
server
.
restore
();
o
.
jio
.
start
();
QUnit
.
stop
();
nThen
(
function
(
waitFor
)
{
// Remove the document if it exists.
o
.
jio
.
remove
({
"
_id
"
:
"
one.json
"
},
waitFor
());
}).
nThen
(
function
(
waitFor
)
{
// post a new document
o
.
spy
(
o
,
"
value
"
,
{
"
id
"
:
"
one.json
"
,
"
ok
"
:
true
},
"
Live post document
"
);
o
.
jio
.
post
({
"
_id
"
:
"
one.json
"
,
"
title
"
:
"
hello
"
},
waitFor
(
o
.
f
));
}).
nThen
(
function
(
waitFor
)
{
o
.
jio
.
get
(
"
one.json
"
,
waitFor
(
function
(
err
,
ret
)
{
ok
(
!
err
);
ok
(
ret
.
_id
==
"
one.json
"
);
ok
(
ret
.
title
==
"
hello
"
);
}));
}).
nThen
(
function
(
waitFor
)
{
// modify document
o
.
spy
(
o
,
"
value
"
,
{
"
id
"
:
"
one.json
"
,
"
ok
"
:
true
},
"
Live modify document
"
);
o
.
jio
.
put
({
"
_id
"
:
"
one.json
"
,
"
title
"
:
"
hello modified
"
},
waitFor
(
o
.
f
));
}).
nThen
(
function
(
waitFor
)
{
o
.
jio
.
get
(
"
one.json
"
,
waitFor
(
function
(
err
,
ret
)
{
ok
(
!
err
);
ok
(
ret
.
title
==
"
hello modified
"
);
}));
}).
nThen
(
function
(
waitFor
)
{
// add attachment
o
.
spy
(
o
,
"
value
"
,
{
"
id
"
:
"
one.json/att.txt
"
,
"
ok
"
:
true
},
"
Put attachment
"
);
o
.
jio
.
putAttachment
({
"
_id
"
:
"
one.json
"
,
"
_attachment
"
:
"
att.txt
"
,
"
_mimetype
"
:
"
text/plain
"
,
"
_data
"
:
"
there2
"
},
waitFor
(
o
.
f
));
}).
nThen
(
function
(
waitFor
)
{
// test allDocs
/*o.jio.allDocs({"include_docs":true},
function(s){console.log(s);},
function ( e ) {console.log(e);
}, o.f);*/
}).
nThen
(
function
(
waitFor
)
{
// get Attachment
o
.
jio
.
getAttachment
({
"
_id
"
:
"
one.json
"
,
"
_attachment
"
:
"
att.txt
"
},
waitFor
(
function
(
err
,
ret
)
{
ok
(
!
err
);
ok
(
ret
==
"
there2
"
);
}));
}).
nThen
(
function
(
waitFor
)
{
// remove Attachment
o
.
spy
(
o
,
"
value
"
,
{
"
id
"
:
"
one.json/att.txt
"
,
"
ok
"
:
true
},
"
Remove attachment
"
);
o
.
jio
.
removeAttachment
({
"
_id
"
:
"
one.json
"
,
"
_attachment
"
:
"
att.txt
"
},
waitFor
(
o
.
f
));
}).
nThen
(
function
(
waitFor
)
{
// remove Document
o
.
spy
(
o
,
"
value
"
,
{
"
id
"
:
"
one.json
"
,
"
ok
"
:
true
},
"
Remove document
"
);
o
.
jio
.
remove
(
"
one.json
"
,
waitFor
(
o
.
f
));
}).
nThen
(
function
(
waitFor
)
{
//console.log("success");
}).
orTimeout
(
function
()
{
//console.log("failed");
ok
(
0
);
},
15000
).
nThen
(
function
()
{
//console.log("complete");
o
.
jio
.
stop
();
QUnit
.
start
();
});
});
})();
// Live XWiki
})();
// xwiki
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment