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

@applitools/dom-snapshot

Package Overview
Dependencies
Maintainers
17
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/dom-snapshot - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

26

dist/processPage.js

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@1.4.3 */
/* @applitools/dom-snapshot@1.4.4 */

@@ -174,11 +174,23 @@ function __processPage() {

if (elementNode.checked && !elementNode.attributes.checked) {
node.attributes.push({name: 'checked', value: 'checked'});
if (elementNode.tagName === 'INPUT' && ['checkbox', 'radio'].includes(elementNode.type)) {
if (elementNode.attributes.checked && !elementNode.checked) {
const idx = node.attributes.findIndex(a => a.name === 'checked');
node.attributes.splice(idx, 1);
}
if (!elementNode.attributes.checked && elementNode.checked) {
node.attributes.push({name: 'checked'});
}
}
if (
elementNode.value !== undefined &&
elementNode.attributes.value === undefined &&
elementNode.tagName === 'INPUT'
elementNode.tagName === 'INPUT' &&
elementNode.type === 'text' &&
(elementNode.attributes.value && elementNode.attributes.value.value) !== elementNode.value
) {
node.attributes.push({name: 'value', value: elementNode.value});
const nodeAttr = node.attributes.find(a => a.name === 'value');
if (nodeAttr) {
nodeAttr.value = elementNode.value;
} else {
node.attributes.push({name: 'value', value: elementNode.value});
}
}

@@ -185,0 +197,0 @@ return node;

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@1.4.3 */
/* @applitools/dom-snapshot@1.4.4 */

@@ -226,11 +226,23 @@ function __processPageAndPoll() {

if (elementNode.checked && !elementNode.attributes.checked) {
node.attributes.push({name: 'checked', value: 'checked'});
if (elementNode.tagName === 'INPUT' && ['checkbox', 'radio'].includes(elementNode.type)) {
if (elementNode.attributes.checked && !elementNode.checked) {
const idx = node.attributes.findIndex(a => a.name === 'checked');
node.attributes.splice(idx, 1);
}
if (!elementNode.attributes.checked && elementNode.checked) {
node.attributes.push({name: 'checked'});
}
}
if (
elementNode.value !== undefined &&
elementNode.attributes.value === undefined &&
elementNode.tagName === 'INPUT'
elementNode.tagName === 'INPUT' &&
elementNode.type === 'text' &&
(elementNode.attributes.value && elementNode.attributes.value.value) !== elementNode.value
) {
node.attributes.push({name: 'value', value: elementNode.value});
const nodeAttr = node.attributes.find(a => a.name === 'value');
if (nodeAttr) {
nodeAttr.value = elementNode.value;
} else {
node.attributes.push({name: 'value', value: elementNode.value});
}
}

@@ -237,0 +249,0 @@ return node;

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@1.4.3 */
/* @applitools/dom-snapshot@1.4.4 */

@@ -226,11 +226,23 @@ function __processPageAndSerialize() {

if (elementNode.checked && !elementNode.attributes.checked) {
node.attributes.push({name: 'checked', value: 'checked'});
if (elementNode.tagName === 'INPUT' && ['checkbox', 'radio'].includes(elementNode.type)) {
if (elementNode.attributes.checked && !elementNode.checked) {
const idx = node.attributes.findIndex(a => a.name === 'checked');
node.attributes.splice(idx, 1);
}
if (!elementNode.attributes.checked && elementNode.checked) {
node.attributes.push({name: 'checked'});
}
}
if (
elementNode.value !== undefined &&
elementNode.attributes.value === undefined &&
elementNode.tagName === 'INPUT'
elementNode.tagName === 'INPUT' &&
elementNode.type === 'text' &&
(elementNode.attributes.value && elementNode.attributes.value.value) !== elementNode.value
) {
node.attributes.push({name: 'value', value: elementNode.value});
const nodeAttr = node.attributes.find(a => a.name === 'value');
if (nodeAttr) {
nodeAttr.value = elementNode.value;
} else {
node.attributes.push({name: 'value', value: elementNode.value});
}
}

@@ -237,0 +249,0 @@ return node;

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@1.4.3 */
/* @applitools/dom-snapshot@1.4.4 */
'use strict';

@@ -171,11 +171,23 @@

if (elementNode.checked && !elementNode.attributes.checked) {
node.attributes.push({name: 'checked', value: 'checked'});
if (elementNode.tagName === 'INPUT' && ['checkbox', 'radio'].includes(elementNode.type)) {
if (elementNode.attributes.checked && !elementNode.checked) {
const idx = node.attributes.findIndex(a => a.name === 'checked');
node.attributes.splice(idx, 1);
}
if (!elementNode.attributes.checked && elementNode.checked) {
node.attributes.push({name: 'checked'});
}
}
if (
elementNode.value !== undefined &&
elementNode.attributes.value === undefined &&
elementNode.tagName === 'INPUT'
elementNode.tagName === 'INPUT' &&
elementNode.type === 'text' &&
(elementNode.attributes.value && elementNode.attributes.value.value) !== elementNode.value
) {
node.attributes.push({name: 'value', value: elementNode.value});
const nodeAttr = node.attributes.find(a => a.name === 'value');
if (nodeAttr) {
nodeAttr.value = elementNode.value;
} else {
node.attributes.push({name: 'value', value: elementNode.value});
}
}

@@ -182,0 +194,0 @@ return node;

{
"name": "@applitools/dom-snapshot",
"version": "1.4.4",
"version": "1.4.5",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -114,11 +114,23 @@ /* eslint-disable no-use-before-define */

if (elementNode.checked && !elementNode.attributes.checked) {
node.attributes.push({name: 'checked', value: 'checked'});
if (elementNode.tagName === 'INPUT' && ['checkbox', 'radio'].includes(elementNode.type)) {
if (elementNode.attributes.checked && !elementNode.checked) {
const idx = node.attributes.findIndex(a => a.name === 'checked');
node.attributes.splice(idx, 1);
}
if (!elementNode.attributes.checked && elementNode.checked) {
node.attributes.push({name: 'checked'});
}
}
if (
elementNode.value !== undefined &&
elementNode.attributes.value === undefined &&
elementNode.tagName === 'INPUT'
elementNode.tagName === 'INPUT' &&
elementNode.type === 'text' &&
(elementNode.attributes.value && elementNode.attributes.value.value) !== elementNode.value
) {
node.attributes.push({name: 'value', value: elementNode.value});
const nodeAttr = node.attributes.find(a => a.name === 'value');
if (nodeAttr) {
nodeAttr.value = elementNode.value;
} else {
node.attributes.push({name: 'value', value: elementNode.value});
}
}

@@ -125,0 +137,0 @@ return node;

Sorry, the diff of this file is too big to display

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