witten
/
luminotes
Archived
1
0
Fork 0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/static/js/test/Test_wiki.html

108 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html id="html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Luminotes Wiki Tests</title>
<script language="JavaScript" type="text/javascript" src="../../jsunit/app/jsUnitCore.js"></script>
<script language="JavaScript" type="text/javascript" src="../MochiKit.js"></script>
<script language="JavaScript" type="text/javascript" src="Stub_invoker.js"></script>
<script language="JavaScript" type="text/javascript" src="Stub_editor.js"></script>
<script language="JavaScript" type="text/javascript" src="../Wiki.js"></script>
<script language="JavaScript" type="text/javascript">
function setUp() {
stub_invoker = new Invoker( function ( url, args ) {
var notebook = {
"name": "fake notebook",
"object_id": "fake_notebook_id",
"revision": "fake_notebook_revision",
"read_write": "true",
"trash": {
"name": "trash",
"object_id": "fake_trash_id",
"revision": "fake_trash_revision",
"read_write": "true",
"trash": null
}
}
if ( url == "/users/current" ) {
return {
"user": {
"username": "case",
"object_id": "fake_user_id",
"revision": "fake_user_revision"
},
"notebook": [ notebook ],
"startup_notes": [],
"http_url": "",
"login_url": ""
}
}
if ( url == "/notebooks/contents" ) {
return {
"notebook": notebook,
"startup_notes": [],
"note": []
};
}
if ( url == "/next_id" ) {
return {
"next_id": "" + Math.random()
}
}
fail( "unknown invoke() url: " + url );
} );
wiki = new Wiki( stub_invoker );
}
function test_Wiki() {
assertNotUndefined( wiki );
assertNotNull( wiki );
}
</script>
</head>
<body>
<h1>Luminotes Wiki Tests</h1>
<p>This page contains tests for the Luminotes Wiki class. To see them, take a look at the source.</p>
<form id="search_form">
<input id="search_button" type="button" />
</form>
<div id="user_area"></div>
<div id="notebooks_area"></div>
<div id="notebook_header_area"></div>
<div id="this_notebook_area"></div>
<div id="notes"></div>
<div id="toolbar">
<input id="bold" type="button" />
<input id="italic" type="button" />
<input id="underline" type="button" />
<input id="title" type="button" />
<input id="insertUnorderedList" type="button" />
<input id="insertOrderedList" type="button" />
<input id="createLink" type="button" />
<input id="newNote" type="button" />
</div>
<input type="hidden" name="notebook_id" id="notebook_id" value="fake_notebook_id" />
<input type="hidden" name="note_id" id="note_id" value="" />
<input type="hidden" name="parent_id" id="parent_id" value="" />
<input type="hidden" name="revision" id="revision" value="" />
<input type="hidden" name="note_contents" id="note_contents" value="" />
</body>
</html>