mirror of https://github.com/zulip/zulip.git
tests: Write screenshots for all casperjs failures to /tmp/.
(imported from commit 4e1a54b89fce76c6923157967ade3d525f5c7f30)
This commit is contained in:
parent
0fee4e8d9d
commit
b861e19654
|
@ -1,6 +1,16 @@
|
|||
// Set default viewport size to something reasonable
|
||||
casper.page.viewportSize = {width: 1280, height: 768 };
|
||||
|
||||
|
||||
// Capture screens from all fails
|
||||
var casper_failure_count = 1;
|
||||
casper.test.on('fail', function failure() {
|
||||
if (casper_failure_count <= 10) {
|
||||
casper.capture("/tmp/casper-failure" + casper_failure_count + ".png");
|
||||
casper_failure_count++;
|
||||
}
|
||||
});
|
||||
|
||||
var common = (function () {
|
||||
|
||||
var exports = {};
|
||||
|
|
|
@ -5,6 +5,7 @@ import time
|
|||
import sys
|
||||
import os
|
||||
from os import path
|
||||
import glob
|
||||
|
||||
os.environ["TORNADO_SERVER"] = "http://localhost:9983"
|
||||
|
||||
|
@ -18,6 +19,8 @@ os.chdir(path.join(path.dirname(__file__), '../../..'))
|
|||
|
||||
subprocess.check_call('zephyr/tests/generate-fixtures')
|
||||
|
||||
subprocess.check_call(['rm', '-f'] + glob.glob('/tmp/casper-failure*.png'))
|
||||
|
||||
log = open('zephyr/tests/frontend/server.log', 'w')
|
||||
|
||||
# Run this not through the shell, so that we have the actual PID.
|
||||
|
|
Loading…
Reference in New Issue