diff --git a/schemas/block-inserter-payload.schema.json b/schemas/block-inserter-payload.schema.json index 3bdc5a605..090d8583d 100644 --- a/schemas/block-inserter-payload.schema.json +++ b/schemas/block-inserter-payload.schema.json @@ -75,6 +75,10 @@ "type": [ "string", "null" ], "description": "SVG markup as a string, or null when the block has no renderable icon." }, + "iconForeground": { + "type": [ "string", "null" ], + "description": "CSS color (hex or rgba) applied to the SVG icon's foreground, or null when the block uses default tinting." + }, "frecency": { "type": "number" }, "isDisabled": { "type": "boolean" }, "isSearchOnly": { "type": "boolean" }, diff --git a/src/utils/blocks.test.js b/src/utils/blocks.test.js index 984b2643e..d7f2ff60a 100644 --- a/src/utils/blocks.test.js +++ b/src/utils/blocks.test.js @@ -38,8 +38,8 @@ function assertBlockInserterPayloadShape( payload ) { if ( validate( payload ) ) { return; } - const { instancePath, message } = validate.errors[ 0 ]; - throw new Error( `${ instancePath || '/' }: ${ message }` ); + const { instancePath, dataPath, message } = validate.errors[ 0 ]; + throw new Error( `${ instancePath || dataPath || '/' }: ${ message }` ); } function makeInserterItem( overrides = {} ) {