New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browser-monkey

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-monkey - npm Package Compare versions

Comparing version 1.15.9 to 1.15.10

2

package.json
{
"name": "browser-monkey",
"version": "1.15.9",
"version": "1.15.10",
"description": "reliable dom testing",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,6 +23,11 @@ function dispatchEvent(el, type, char) {

for (var n = 0; n < text.length; ++n) {
var char = text[n];
el.value = text.substring(0, n + 1);
sendkey(el, char);
if (text.length === 0) {
sendkey(el, '');
el.value = '';
} else {
for (var n = 0; n < text.length; ++n) {
var char = text[n];
el.value = text.substring(0, n + 1);
sendkey(el, char);
}
}

@@ -29,0 +34,0 @@

@@ -259,2 +259,13 @@ require('lie/polyfill');

});
it('typing empty text blanks out existing text', function () {
var firedEvents = [];
insertHtml('<input type="text" class="element" value="good bye">')
.on('input', function(){ firedEvents.push('input'); });
return browser.find('.element').typeIn('').then(function () {
expect($(div).find('input.element').val()).to.equal('');
expect(firedEvents).to.eql(['input'])
});
});
});

@@ -280,2 +291,19 @@

it('typeIn element should fire input on each character', function(){
var firedEvents = [];
insertHtml('<input type="text" class="input">')
.on('input', function(){
firedEvents.push('input');
});
return browser.find('.input').typeIn('123').then(function(){
expect(firedEvents).to.eql([
'input',
'input',
'input'
])
});
});
it('typeIn element should fire change and then blur event on input', function(){

@@ -282,0 +310,0 @@ var firedEvents = [];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc