Commit 967ee185 967ee185ea7032601a7f85d302c9efabeeaf1ef5 by Nicolas Perriault

dubious tests now have dedicated color & styling

1 parent 4fedbaae
......@@ -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 }
};
/**
......
......@@ -76,7 +76,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 successful 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);
// properties
......@@ -1008,8 +1009,8 @@ Tester.prototype.renderResults = function renderResults(exit, status, save) {
var total = this.testResults.passed + this.testResults.failed, statusText, style, result;
var exitStatus = ~~(status || (this.testResults.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 (this.testResults.failed > 0) {
......