diff --git a/packages/blocks/src/api/test/validation.js b/packages/blocks/src/api/test/validation.js index dd63c49926c129..1ed36638b21eda 100644 --- a/packages/blocks/src/api/test/validation.js +++ b/packages/blocks/src/api/test/validation.js @@ -282,13 +282,13 @@ describe( 'validation', () => { expect( isEqual ).toBe( true ); } ); - it( 'returns false if not same style', () => { + it( 'returns true even if the style is different', () => { const isEqual = isEqualAttributesOfName.style( 'background-image: url( "https://wordpress.org/img.png" ); color: red;', "color: red; font-size: 13px; background-image: url('https://wordpress.org/img.png');" ); - expect( isEqual ).toBe( false ); + expect( isEqual ).toBe( true ); } ); } ); diff --git a/packages/blocks/src/api/validation/index.js b/packages/blocks/src/api/validation/index.js index e60ef496a8df7e..5fa726ad8c3642 100644 --- a/packages/blocks/src/api/validation/index.js +++ b/packages/blocks/src/api/validation/index.js @@ -2,7 +2,7 @@ * External dependencies */ import { Tokenizer } from 'simple-html-tokenizer'; -import { identity, xor, fromPairs, isEqual, includes, stubTrue } from 'lodash'; +import { identity, xor, fromPairs, includes, stubTrue } from 'lodash'; /** * WordPress dependencies @@ -407,9 +407,7 @@ export const isEqualAttributesOfName = { ...[ actual, expected ].map( getTextPiecesSplitOnWhitespace ) ).length; }, - style: ( actual, expected ) => { - return isEqual( ...[ actual, expected ].map( getStyleProperties ) ); - }, + style: () => true, // For each boolean attribute, mere presence of attribute in both is enough // to assume equivalence. ...fromPairs( diff --git a/test/integration/fixtures/blocks/core__cover__deprecated-4.json b/test/integration/fixtures/blocks/core__cover__deprecated-4.json index 1edc0109e3f342..5a58ca33c31394 100644 --- a/test/integration/fixtures/blocks/core__cover__deprecated-4.json +++ b/test/integration/fixtures/blocks/core__cover__deprecated-4.json @@ -6,6 +6,7 @@ "attributes": { "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==", "id": 35, + "isRepeated": false, "hasParallax": false, "dimRatio": 50, "backgroundType": "image", diff --git a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.html b/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.html deleted file mode 100644 index 7381e2582f3114..00000000000000 --- a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -
- \ No newline at end of file diff --git a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.json b/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.json deleted file mode 100644 index 7e771e0d676133..00000000000000 --- a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "clientId": "_clientId_0", - "name": "core/spacer", - "isValid": true, - "attributes": { - "height": "0px", - "width": "72px" - }, - "innerBlocks": [], - "originalContent": "" - } -] diff --git a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.parsed.json b/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.parsed.json deleted file mode 100644 index 9e88a1c01a0037..00000000000000 --- a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.parsed.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "blockName": "core/spacer", - "attrs": { - "height": 0, - "width": 72 - }, - "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] - } -] diff --git a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.serialized.html b/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.serialized.html deleted file mode 100644 index d8e2dd16f33528..00000000000000 --- a/test/integration/fixtures/blocks/core__spacer__horizontal__deprecated-1.serialized.html +++ /dev/null @@ -1,3 +0,0 @@ - - -