Commit 3f1d2a39 3f1d2a3991e0314e04a6b00298c18f077ec58f85 by Nicolas Perriault

more detailled test output for assertSelectorContains()

1 parent 848791c2
......@@ -666,13 +666,15 @@ Tester.prototype.assertFalsy = function assertFalsy(subject, message) {
Tester.prototype.assertSelectorHasText =
Tester.prototype.assertSelectorContains = function assertSelectorHasText(selector, text, message) {
"use strict";
var textFound = this.casper.fetchText(selector).indexOf(text) !== -1;
var got = this.casper.fetchText(selector);
var textFound = got.indexOf(text) !== -1;
return this.assert(textFound, message, {
type: "assertSelectorHasText",
standard: f('Found "%s" within the selector "%s"', text, selector),
values: {
selector: selector,
text: text
text: text,
actualContent: got
}
});
};
......