Commit a11f189b authored by worry127722's avatar worry127722

修改测试框架

parent d6f01c94
describe("command", function () {
//初始化kityminder
var kityMinderDiv = document.createElement("div");
kityMinderDiv.id = "kityminder";
kityMinderDiv.style.height = "500px";
......@@ -6,11 +7,9 @@ describe("command", function () {
var obj;
var km;
beforeEach(function(){
document.body.appendChild(kityMinderDiv);
km = KM.getKityMinder('kityminder');
km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
obj = document.getElementById('kityminder');
});
......@@ -18,11 +17,12 @@ describe("command", function () {
// obj = null;
// document.body.removeChild(kityMinderDiv);
});
//kityminder初始化end
it('',function(){
console.log(km);
obj = document.getElementById('kityminder');
console.log(obj);
})
});
\ No newline at end of file
......@@ -45,11 +45,11 @@
///import module/resource;
///import module/view;
///import module/dragtree;
///import module/dropfile;
///import module/keyboard;
///import module/select;
///import module/history;
///import module/editor;
///import module/editor.keyboard;
///import module/editor.range;
///import module/editor.receiver;
///import module/editor.selection;
......@@ -59,38 +59,7 @@
///import module/hyperlink;
///import module/arrange;
///import module/paste;
///import ui/jquery-ui-1.10.4.custom.min;
///import ui/widget;
///import ui/button;
///import ui/toolbar;
///import ui/menu;
///import ui/dropmenu;
///import ui/splitbutton;
///import ui/colorsplitbutton;
///import ui/popup;
///import ui/scale;
///import ui/colorpicker;
///import ui/combobox;
///import ui/buttoncombobox;
///import ui/modal;
///import ui/tooltip;
///import ui/tab;
///import ui/separator;
///import ui/scale;
///import adapter/utils;
///import adapter/adapter;
///import adapter/button;
///import adapter/combobox;
///import adapter/color;
///import adapter/saveto;
///import adapter/tooltips;
///import adapter/face;
///import adapter/node;
///import adapter/contextmenu;
///import adapter/dialog;
///import adapter/hyperlink;
///import adapter/image;
///import adapter/zoom;
///import module/style;
///import protocal/xmind;
///import protocal/freemind;
///import protocal/mindmanager;
......@@ -98,3 +67,59 @@
///import protocal/json;
///import protocal/png;
///import protocal/svg;
///import ui/ui;
///import ui/eve;
///import ui/fuix;
///import ui/fiox;
///import ui/doc;
///import ui/widget/commandbutton;
///import ui/widget/commandbuttonset;
///import ui/widget/commandinputmenu;
///import ui/widget/friendlytimespan;
///import ui/widget/locallist;
///import ui/widget/netdiskfinder;
///import ui/widget/menutab;
///import ui/menu/menu;
///import ui/menu/header;
///import ui/menu/default;
///import ui/menu/new/new;
///import ui/menu/open/open;
///import ui/menu/open/recent;
///import ui/menu/open/netdisk;
///import ui/menu/open/local;
///import ui/menu/open/draft;
///import ui/menu/save/save;
///import ui/menu/save/netdisk;
///import ui/menu/save/download;
///import ui/menu/share/share;
///import ui/topbar/history;
///import ui/topbar/user;
///import ui/topbar/search;
///import ui/topbar/title;
///import ui/ribbon/tabs;
///import ui/ribbon/idea/insert;
///import ui/ribbon/idea/arrange;
///import ui/ribbon/idea/operation;
///import ui/ribbon/idea/attachment;
///import ui/ribbon/idea/link;
///import ui/ribbon/idea/image;
///import ui/ribbon/idea/priority;
///import ui/ribbon/idea/progress;
///import ui/ribbon/idea/resource;
///import ui/ribbon/appearence/template;
///import ui/ribbon/appearence/theme;
///import ui/ribbon/appearence/layout;
///import ui/ribbon/appearence/style;
///import ui/ribbon/appearence/font;
///import ui/ribbon/appearence/color;
///import ui/ribbon/view/level;
......@@ -58,9 +58,21 @@ class Kiss
//先引用kity
print "<script src='../../lib/jquery-2.1.0.min.js'></script>\n";
print "<script src='../../lib/jquery.xml2json.js' charset='utf-8'></script>\n";
print "<script src='../../lib/jquery.transit.min.js' charset='utf-8'></script>\n";
print "<script src='../../lib/jquery.blob.js' charset='utf-8'></script>\n";
print "<script src='../../lib/zip.js' charset='utf-8'></script>\n";
print "<script src='../../lib/promise-1.0.0.js' charset='utf-8'></script>\n";
print "<script src='../../lib/ZeroClipboard.min.js' charset='utf-8'></script>\n";
print "<script type='text/javascript'>ZeroClipboard.setDefaults( { moviePath: '../../lib/ZeroClipboard.swf' } );</script>\n";
print "<script src='../../kity/dist/kity.js' charset='utf-8'></script>\n";
print "<script src='../../lib/fui/dev-lib/jhtmls.min.js' charset='utf-8'></script>\n";
print "<script src='../../lib/fui/dist/fui.all.js' charset='utf-8'></script>\n";
print "<script src='../../lib/fio/src/fio.js' charset='utf-8'></script>\n";
print "<script src='../../lib/fio/provider/netdisk/oauth.js' charset='utf-8'></script>\n";
print "<script src='../../lib/fio/provider/netdisk/netdisk.js' charset='utf-8'></script>\n";
print "<script src='../../lib/kity/dist/kity.js' charset='utf-8'></script>\n";
//分成两部分:一部分默认加载(可配置),一部分针对文件加载(例如在文件头部有注释标注依赖文件,根据依赖文件动态加载)
// core里面的文件全部加载,module加载用例对应的src文件,最后加载与用例同名的原文件
......@@ -70,10 +82,10 @@ class Kiss
print "<script src='../../kityminder.config.js' charset='utf-8'></script>\n";
print "<script src='../../lang/zh-cn/zh-cn.js' charset='utf-8'></script>\n";
print "<script src='../../lib/zip.js' charset='utf-8'></script>\n";
print "<script>zip.inflateJSPath = '../../lib/inflate.js';</script>\n";
print "<script src='../../lib/jquery.xml2json.js' charset='utf-8'></script>\n";
print "<script src='../../lib/baidu-frontia-js-full-1.0.0.js' charset='utf-8'></script>\n";
print "<script type='text/javascript'>zip.inflateJSPath = '../../lib/inflate.js';</script>\n";
print "<script type='text/javascript'>window._bd_share_config={'common':{'bdSnsKey':{},'bdMini':'2','bdMiniList':[],'bdPic':'','bdStyle':'1','bdSize':'32'},'share':{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>\n";
// print "<script>zip.inflateJSPath = '../../lib/inflate.js';</script>\n";
// print "<script src='../../lib/baidu-frontia-js-full-1.0.0.js' charset='utf-8'></script>\n";
// print "<script src='../../social/draftmanager.js' charset='utf-8'></script>\n";
// print "<script src='../../social/social.js' charset='utf-8'></script>\n";
......@@ -81,8 +93,8 @@ class Kiss
//引用测试文件
print '<script type="text/javascript" src="' .$this->testPath.$this->name. '.js"></script>' . "\n";
print "<link href='../../social/social.css' rel='stylesheet'>\n";
print "<link href='../../themes/default/css/import.css' type='text/css' rel='stylesheet' />\n";
print "<link href='../../ui/theme/default/css/default.all.css' rel='stylesheet'>\n";
// print "<link href='../../themes/default/css/import.css' type='text/css' rel='stylesheet' />\n";
print "<link href='../../favicon.ico' type='image/x-icon' rel='shortcut icon'>\n";
print "<link href='../../favicon.ico' type='image/x-icon' rel='apple-touch-icon-precomposed'>\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment