Author: clopes
Date: 2011-07-27 14:13:51 -0700 (Wed, 27 Jul 2011)
New Revision: 26294

Modified:
   cytoscapeweb/trunk/cytoscapeweb/html-template/js/tests.js
Log:
Just added another test for "transparent" node color--visual style bypass.

Modified: cytoscapeweb/trunk/cytoscapeweb/html-template/js/tests.js
===================================================================
--- cytoscapeweb/trunk/cytoscapeweb/html-template/js/tests.js   2011-07-27 
20:49:53 UTC (rev 26293)
+++ cytoscapeweb/trunk/cytoscapeweb/html-template/js/tests.js   2011-07-27 
21:13:51 UTC (rev 26294)
@@ -631,6 +631,23 @@
                ok(count === 0, "No more edges bypass props");
     });
     
+    test("Bypass--transparent nodes", function() {
+       var n = vis.nodes()[0];
+       var e = vis.edges()[0];
+       var bypass = { nodes: {}, edges: {} };
+       bypass.nodes[n.data.id] = { color: "transparent" };
+       bypass.edges[e.data.id] = { color: "transparent" }; // should be 
converted to white!
+       
+       vis.visualStyleBypass(bypass);
+       
+       same(vis.visualStyleBypass().nodes[n.data.id].color, "transparent", 
"Visual Style nodes color");
+       same(vis.visualStyleBypass().edges[e.data.id].color, "#ffffff", "Visual 
Style edges color");
+       same(vis.node(n.data.id).color, "transparent", "Node color");
+       same(vis.edge(e.data.id).color, "#ffffff", "Edge color");
+       
+       vis.visualStyleBypass({});
+    });
+    
     asyncTest("Preset Layout", function() {
        expect(4);
        var points = [ { id: "1", x: 10, y: -20 },

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to