Commit e3527d64 authored by Jérome Perrin's avatar Jérome Perrin Committed by Eteri

graph_editor: use a different element for each test

Otherwise, the event handler is set multiple times on the same #qunit-fixture element
parent 86c19b73
......@@ -15,6 +15,8 @@
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div id="qunit-fixture">
<div id="test-element"/>
</div>
</body>
</html>
......@@ -164,7 +164,7 @@
var jsplumb_gadget;
stop();
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
return jsplumb_gadget.render(sample_data_graph);
......@@ -201,7 +201,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_empty_graph);
......@@ -229,7 +229,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_graph);
......@@ -280,7 +280,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_graph);
......@@ -312,7 +312,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_graph_not_connected);
......@@ -359,7 +359,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_graph);
......@@ -407,7 +407,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_graph);
......@@ -480,7 +480,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_empty_graph);
......@@ -546,7 +546,7 @@
});
}
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
jsplumb_gadget.render(sample_data_empty_graph);
......@@ -556,7 +556,7 @@
var jsplumb_gadget;
stop();
g.declareGadget("./index.html", {
element: document.querySelector("#qunit-fixture")
element: document.querySelector("#test-element")
}).then(function(new_gadget) {
jsplumb_gadget = new_gadget;
return jsplumb_gadget.render(sample_data_graph_no_node_coordinate);
......
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