mirror of https://gitee.com/bigwinds/arangodb
GraphViewer: Added an additional test for label switching
This commit is contained in:
parent
e23edd007d
commit
1507b32314
|
@ -403,6 +403,21 @@
|
||||||
expect($("svg .node text")[0].textContent).toEqual("0");
|
expect($("svg .node text")[0].textContent).toEqual("0");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should be able to switch to another label during runtime', function() {
|
||||||
|
var node = [{
|
||||||
|
_id: 1,
|
||||||
|
label: "before",
|
||||||
|
switched: "after"
|
||||||
|
}];
|
||||||
|
shaper.drawNodes(node);
|
||||||
|
expect($("svg .node text")[0].textContent).toEqual("before");
|
||||||
|
shaper.changeTo({label: "switched"});
|
||||||
|
expect($("svg .node text")[0]).toBeDefined();
|
||||||
|
expect($("svg .node text").length).toEqual(1);
|
||||||
|
expect($("svg .node text")[0].textContent).toEqual("after");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('using a function for labels', function () {
|
describe('using a function for labels', function () {
|
||||||
|
|
Loading…
Reference in New Issue