Commit a069829f a069829f7f815927aa90bcffef669d669262243c by Nicolas Perriault

sync with master

2 parents 9d720691 cdeaaf43
......@@ -14,6 +14,7 @@ XXXX-XX-XX, v1.0.0
- fixed [#323](https://github.com/n1k0/casperjs/issues/323) - `thenEvaluate()` should be updated to take the same parameters as `evaluate()`, while maintaining backwards compatibility.
- merged PR [#319](https://github.com/n1k0/casperjs/pull/319), fixed [#209](https://github.com/n1k0/casperjs/issues/209) - test duration has been added to XUnit XML result file.
- `Casper.userAgent()` does not require the instance to be started anymore
- dubious tests now have dedicated color & styling
2012-12-14, v1.0.0-RC6
----------------------
......
......@@ -64,7 +64,8 @@ var Colorizer = function Colorizer() {
'WARNING': { fg: 'red', bold: true },
'GREEN_BAR': { fg: 'white', bg: 'green', bold: true },
'RED_BAR': { fg: 'white', bg: 'red', bold: true },
'INFO_BAR': { bg: 'cyan', fg: 'white', bold: true }
'INFO_BAR': { bg: 'cyan', fg: 'white', bold: true },
'WARN_BAR': { bg: 'yellow', fg: 'white', bold: true }
};
/**
......
......@@ -87,7 +87,8 @@ var Tester = function Tester(casper, options) {
failFast: false, // terminates a suite as soon as a test fails?
failText: "FAIL", // text to use for a succesful test
passText: "PASS", // text to use for a failed test
pad: 80 // maximum number of chars for a result line
pad: 80 , // maximum number of chars for a result line
warnText: "WARN" // text to use for a dubious test
}, options);
this.configure();
......@@ -1007,8 +1008,8 @@ Tester.prototype.renderResults = function renderResults(exit, status, save) {
result,
exitStatus = ~~(status || (failed > 0 ? 1 : 0));
if (total === 0) {
statusText = this.options.failText;
style = 'RED_BAR';
statusText = this.options.warnText;
style = 'WARN_BAR';
result = f("%s Looks like you didn't run any test.", statusText);
} else {
if (failed > 0) {
......
/*jshint strict:false*/
/*global CasperError casper console phantom require*/
if (phantom.version.major === 1 && phantom.version.minor < 8) {
// https://github.com/n1k0/casperjs/issues/101
casper.warn('document.location is broken under phantomjs < 1.8');
casper.test.done();
} else {
casper.start('tests/site/index.html', function() {
this.evaluate(function() {
document.location = '/tests/site/form.html';
});
});
casper.then(function() {
this.test.assertUrlMatches(/form\.html$/);
});
casper.run(function() {
this.test.done();
});
}