browser-monkey
Advanced tools
Comparing version 1.15.13 to 1.16.0
@@ -94,3 +94,3 @@ var retry = require('trytryagain'); | ||
if (exact) { | ||
expect(actual, 'expected element to have exact text ' + JSON.stringify(expected) + ' but contained ' + JSON.stringify(actual)).to.equal(expected); | ||
expect(actual, 'expected element to have exact text ' + JSON.stringify(expected) + ' but contained ' + JSON.stringify(actual)).to.equal(expected.toString()); | ||
} else { | ||
@@ -162,3 +162,3 @@ expect(actual, 'expected element to contain ' + JSON.stringify(expected) + ' but contained ' + JSON.stringify(actual)).to.contain(expected); | ||
if (exactText !== undefined) { | ||
assertElementProperties(els, exactText.toString(), function (e) { return e.text(); }, true); | ||
assertElementProperties(els, exactText, function (e) { return e.text(); }, true); | ||
} | ||
@@ -165,0 +165,0 @@ |
{ | ||
"name": "browser-monkey", | ||
"version": "1.15.13", | ||
"version": "1.16.0", | ||
"description": "reliable dom testing", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -492,2 +492,12 @@ require('lie/polyfill'); | ||
describe('exactText', function(){ | ||
it('eventually finds elements that have the exact array of text', function(){ | ||
var promise = browser.find('.element option').shouldHave({exactText: ['', 'Mr', 'Mrs']}); | ||
eventuallyInsertHtml('<select class="element"><option></option><option>Mr</option><option>Mrs</option></select>'); | ||
return promise; | ||
}); | ||
}); | ||
describe('checkboxes', function () { | ||
@@ -494,0 +504,0 @@ it('eventually finds a checked checkbox', function () { |
57378
1203