Commit dc8b8c72 authored by worry127722's avatar worry127722

修改测试框架

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