Commit dc8b8c72 authored by worry127722's avatar worry127722

修改测试框架

parent de30dda3
......@@ -9,16 +9,14 @@ describe("command", function () {
beforeEach(function(){
document.body.appendChild(kityMinderDiv);
document.body.appendChild(kityMinderDiv);
km = KM.getKityMinder('kityminder');
obj = document.getElementById('kityminder');
kityMinderDiv.style.display = "block";
});
afterEach(function(){
obj = null;
kityMinderDiv.style.display = "none";
document.body.removeChild(kityMinderDiv);
// obj = null;
// document.body.removeChild(kityMinderDiv);
});
......
......@@ -10,24 +10,34 @@ describe("utils", function () {
beforeEach(function(){
if(flag){
document.body.appendChild(kityMinderDiv);
km = KM.getKityMinder('kityminder');
obj = document.getElementById('kityminder');
document.getElementById('HTMLReporter').appendChild(kityMinderDiv);
km = KM.getKityMinder('kityminder');
obj = document.getElementById('kityminder');
flag = false;
}
});
afterEach(function(){
// obj = null;
// km = null;
// KM = null;
// kityMinderDiv.style.display = "none";
// document.body.removeChild(kityMinderDiv);
console.log(document.body);
// console.log(km);
});
// var kityMinderDiv = document.createElement("div");
// kityMinderDiv.id = "kityminder";
// kityMinderDiv.style.height = "500px";
// kityMinderDiv.style.position = "relative";
// var obj;
// var km;
// var flag = true;
//
// if(flag){
// document.body.appendChild(kityMinderDiv);
// km = KM.getKityMinder('kityminder');
// obj = document.getElementById('kityminder');
// flag = false;
// }
......@@ -39,6 +49,9 @@ describe("utils", function () {
var obj2 = utils.clonePlainObject(obj1);
it('相等',function(){
// console.log(km);
console.log(document.getElementById('kityminder'));
expect(utils.compareObject(obj1,obj2)).toBeTruthy();
});
it('长度不同',function(){
......
......@@ -132,6 +132,7 @@ function run(kiss,runnext) {
var iframe = document.createElement('iframe');
iframe.id = fid;
iframe.src = url;
iframe.style.minHeight="1500px";
addClass(iframe, "runningframe");
runningarea.appendChild(iframe);
wb.kissstart = new Date().getTime();
......
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