add more tests in cli_test-samples: flowchart, sequence, gantt, gitgraph, load html in phantomjs and save screenshot png

This commit is contained in:
whyzdev
2017-01-01 14:58:48 -05:00
parent 2d2f0b9281
commit a56fe7a8fe
8 changed files with 226 additions and 27 deletions

View File

@@ -0,0 +1,15 @@
// usage: ../../../node_modules/.bin/phantomjs <html> <png>
var system = require('system');
var html = system.args[1];
var png = system.args[2];
console.log('png:', png)
var page = require('webpage').create(),
loadInProgress = false,
fs = require('fs');
page.open(html);
page.onLoadFinished = function() {
loadInProgress = false;
page.render(png);
phantom.exit();
}