Browse Source

added network/BasicExample

gemini
Alexander Wunschik 7 years ago
parent
commit
40287e8a1b
4 changed files with 54 additions and 2 deletions
  1. BIN
      test/gemini/screens/network/BasicExample/plain/PhantomJS.png
  2. +44
    -0
      test/gemini/tests/network/BasicExample/index.html
  3. +8
    -0
      test/gemini/tests/network/BasicExample/test.js
  4. +2
    -2
      test/gemini/tests/timeline/BasicExample/test.js

BIN
test/gemini/screens/network/BasicExample/plain/PhantomJS.png View File

Before After
Width: 600  |  Height: 400  |  Size: 18 KiB

+ 44
- 0
test/gemini/tests/network/BasicExample/index.html View File

@ -0,0 +1,44 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Network | BasicExample</title>
<script src="/dist/vis.js"></script>
<link href="/dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#network {
width: 600px;
height: 400px;
}
</style>
</head>
<body>
<div id="network"></div>
<script type="text/javascript">
var nodes = new vis.DataSet([
{id: 1, label: 'Node 1'},
{id: 2, label: 'Node 2'},
{id: 3, label: 'Node 3'},
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'}
]);
var edges = new vis.DataSet([
{from: 1, to: 3},
{from: 1, to: 2},
{from: 2, to: 4},
{from: 2, to: 5},
{from: 3, to: 3}
]);
var container = document.getElementById('network');
var data = {
nodes: nodes,
edges: edges
};
var options = {
layout: {
randomSeed: 1
}
};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>

+ 8
- 0
test/gemini/tests/network/BasicExample/test.js View File

@ -0,0 +1,8 @@
gemini.suite('network/BasicExample', function(suite) {
suite.setUrl('/test/gemini/tests/network/BasicExample/')
.before(function(actions) {
actions.wait(1000);
})
.setCaptureElements('#network')
.capture('plain');
});

+ 2
- 2
test/gemini/tests/timeline/BasicExample/test.js View File

@ -1,8 +1,8 @@
gemini.suite('timline/BasicExample', function(suite) {
suite.setUrl('/test/gemini/tests/timeline/BasicExample/')
.before(function(actions) {
actions.waitForElementToShow('.gemini-test-timeline', 5000);
actions.wait(1000);
})
.setCaptureElements('.gemini-test-timeline')
.setCaptureElements('#timeline')
.capture('plain');
});

Loading…
Cancel
Save