From 2cfbaf98158a2d0fb82720d796d500cc5ed248bc Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 28 Feb 2019 10:24:33 +0100 Subject: [PATCH] Fix block unit tests --- package-lock.json | 24 +++++++++++++------ .../block-library/src/test/helpers/index.js | 1 + packages/editor/src/store/test/selectors.js | 3 +++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38cb8499917642..ac8f0f4025eef8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2532,15 +2532,30 @@ "version": "file:packages/block-editor", "requires": { "@babel/runtime": "^7.0.0", + "@wordpress/a11y": "file:packages/a11y", + "@wordpress/blob": "file:packages/blob", "@wordpress/blocks": "file:packages/blocks", "@wordpress/components": "file:packages/components", "@wordpress/compose": "file:packages/compose", "@wordpress/data": "file:packages/data", + "@wordpress/dom": "file:packages/dom", "@wordpress/element": "file:packages/element", + "@wordpress/hooks": "file:packages/hooks", + "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", + "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", + "@wordpress/keycodes": "file:packages/keycodes", + "@wordpress/rich-text": "file:packages/rich-text", + "@wordpress/token-list": "file:packages/token-list", + "@wordpress/url": "file:packages/url", + "@wordpress/viewport": "file:packages/viewport", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", "lodash": "^4.17.10", + "redux-multi": "^0.1.12", "refx": "^3.0.0", - "rememo": "^3.0.0" + "rememo": "^3.0.0", + "tinycolor2": "^1.4.1" } }, "@wordpress/block-library": { @@ -2785,7 +2800,6 @@ "version": "file:packages/editor", "requires": { "@babel/runtime": "^7.3.1", - "@wordpress/a11y": "file:packages/a11y", "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/blob": "file:packages/blob", "@wordpress/block-editor": "file:packages/block-editor", @@ -2796,21 +2810,17 @@ "@wordpress/data": "file:packages/data", "@wordpress/date": "file:packages/date", "@wordpress/deprecated": "file:packages/deprecated", - "@wordpress/dom": "file:packages/dom", "@wordpress/element": "file:packages/element", "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", - "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/notices": "file:packages/notices", "@wordpress/nux": "file:packages/nux", - "@wordpress/token-list": "file:packages/token-list", "@wordpress/url": "file:packages/url", "@wordpress/viewport": "file:packages/viewport", "@wordpress/wordcount": "file:packages/wordcount", "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.1", "inherits": "^2.0.3", "lodash": "^4.17.11", "memize": "^1.0.5", @@ -2819,7 +2829,6 @@ "redux-optimist": "^1.0.0", "refx": "^3.0.0", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", "traverse": "^0.6.6" } }, @@ -2853,6 +2862,7 @@ "version": "file:packages/format-library", "requires": { "@babel/runtime": "^7.3.1", + "@wordpress/block-editor": "file:packages/block-editor", "@wordpress/components": "file:packages/components", "@wordpress/editor": "file:packages/editor", "@wordpress/element": "file:packages/element", diff --git a/packages/block-library/src/test/helpers/index.js b/packages/block-library/src/test/helpers/index.js index af5e34a3786d18..2f672f2090bd31 100644 --- a/packages/block-library/src/test/helpers/index.js +++ b/packages/block-library/src/test/helpers/index.js @@ -13,6 +13,7 @@ import { registerBlockType, } from '@wordpress/blocks'; import { BlockEdit } from '@wordpress/block-editor'; +import '@wordpress/editor'; export const blockEditRender = ( name, settings ) => { if ( ! getBlockType( name ) ) { diff --git a/packages/editor/src/store/test/selectors.js b/packages/editor/src/store/test/selectors.js index 01f2d09199e52b..1740302fe73d6c 100644 --- a/packages/editor/src/store/test/selectors.js +++ b/packages/editor/src/store/test/selectors.js @@ -122,6 +122,9 @@ describe( 'selectors', () => { category: 'common', title: 'Test Freeform Content Handler', icon: 'test', + supports: { + className: false, + }, attributes: { content: { type: 'string',