mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
add test result storing
This commit is contained in:
parent
0d4b6ba665
commit
8c8128b80a
@ -6,6 +6,7 @@ env:
|
||||
global:
|
||||
- secure: "eW41gIqOizwO4pTgWnAAbW75AP7F+CK9qfSed/fSh4sJ9HWMIY1YRIaY8gjr+6jV/f7XVHcXuym6ZxgINYSkVKbF1JKxBJNLOXtSgNbVHSic58pYFvUjwxIBI9aPig9uux1+DbnpWqXFDTcACJSevQZE0xwmjdrSkDLgB0G34v8="
|
||||
- secure: "Y2Av+Gd3z9uQEB36GwdOOuGka0hx0/HeitASEo59z934O8RxnmN9eNTXS7dDT3XtKtwxIyLTOEpS7qlRdWahH28hr/dS4xJj6ao58C+1xMcDs6NAPGmDxUlcJWpcGEsnjmXjQCc3fBioSTdpIBrK/gdvgpNh77UKG74Sk7Z+YGk="
|
||||
- secure: "N7NyiiwdsVsKLomdkdeb1lUdSiN7+luks0V4Sh+foJp1RnBqM54B+0pZNiwotMuhTuwv0kjURCooKiyV3eaTleRthutGL9Gt8YiCaCq+biZaZXZnk0E3AQqg/ZzQLeZyreQpcMGsbCnwtywtjvTYB6aJA+ZFzEhq5LRF8tsDn2Y="
|
||||
before_script:
|
||||
- npm install -g grunt-cli
|
||||
- curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
|
||||
|
@ -1,6 +1,9 @@
|
||||
html2canvas
|
||||
===========
|
||||
|
||||
### Current build status ###
|
||||
[![Build Status](https://travis-ci.org/niklasvh/html2canvas.png)](https://travis-ci.org/niklasvh/html2canvas)
|
||||
|
||||
#### JavaScript HTML renderer ####
|
||||
|
||||
This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.
|
||||
|
@ -147,7 +147,33 @@
|
||||
} catch(e) {}
|
||||
|
||||
console.log(colors.violet, "Writing", browser + ".json");
|
||||
fs.writeFile(filename, JSON.stringify(results[browser]));
|
||||
var date = new Date();
|
||||
var result = JSON.stringify({
|
||||
browser: browser,
|
||||
results: results[browser],
|
||||
timestamp: date.toISOString()
|
||||
});
|
||||
|
||||
if (process.env.MONGOLAB_URL) {
|
||||
var options = {
|
||||
host: "api.mongolab.com",
|
||||
port: 443,
|
||||
path: process.env.MONGOLAB_URL,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Length': result.length
|
||||
}
|
||||
};
|
||||
|
||||
var post_req = http.request(options, function(res) {
|
||||
});
|
||||
|
||||
post_req.write(result);
|
||||
post_req.end();
|
||||
}
|
||||
|
||||
fs.writeFile(filename, result);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user