browser-monkey
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -19,2 +19,3 @@ var chai = require('chai') | ||
}) | ||
var originalActualTexts = actualTexts.slice(0) | ||
@@ -38,2 +39,6 @@ expect(actualTexts.length, 'expected ' + JSON.stringify(actualTexts) + ' to respectively contain ' + JSON.stringify(expected)).to.eql(expected.length) | ||
if (found.length !== expected.length) { | ||
expect(originalActualTexts).to.eql(expected) | ||
} | ||
try { | ||
@@ -40,0 +45,0 @@ expect(found).to.eql(expected) |
{ | ||
"name": "browser-monkey", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "reliable dom testing", | ||
@@ -9,5 +9,2 @@ "main": "index.js", | ||
}, | ||
"engines": { | ||
"node": "7.6.0" | ||
}, | ||
"author": "Tim Macfarlane <timmacfarlane@gmail.com>", | ||
@@ -14,0 +11,0 @@ "license": "MIT", |
@@ -13,3 +13,3 @@ # browser monkey [![npm version](https://img.shields.io/npm/v/browser-monkey.svg)](https://www.npmjs.com/package/browser-monkey) [![npm](https://img.shields.io/npm/dm/browser-monkey.svg)](https://www.npmjs.com/package/browser-monkey) [![Build Status](https://travis-ci.org/featurist/browser-monkey.svg?branch=master)](https://travis-ci.org/featurist/browser-monkey) [![Gitter chat](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/featurist/stack) | ||
* create rich DSLs for your page structure | ||
* framework agnostic: works with React, Angular, jQuery, [Plastiq](https://github.com/featurist/plastiq) and many many more. | ||
* framework agnostic: works with React, Angular, jQuery, [Hyperdom](https://github.com/featurist/hyperdom) and many many more. | ||
* can simulate text entry and clicks. (please let us know if you need more!) | ||
@@ -16,0 +16,0 @@ * returns promises that resolve when the elements are found. |
@@ -201,2 +201,18 @@ var assert = require('assert') | ||
domTest('error contains actual element text when no match found', function (browser, dom) { | ||
dom.insert('<span>abc</span>') | ||
dom.insert('<span>bac</span>') | ||
dom.insert('<span>c</span>') | ||
return browser.find('span').shouldHave({ | ||
text: [ | ||
'cba', | ||
'abc', | ||
'bac' | ||
] | ||
}).catch(function (error) { | ||
demand(error.message).to.include("expected [ 'abc', 'bac', 'c' ]") | ||
}) | ||
}) | ||
domTest('finds an element with exact value', function (browser, dom) { | ||
@@ -203,0 +219,0 @@ var bad = browser.find('.element1 input').shouldHave({exactValue: 'some t'}) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
305213
3037
0