Tests: Synchronize Theme.JSON unit test between Core and Gutenberg.

Merges the changes from Core and Gutenberg for the following tests:

- WP_REST_Global_Styles_Controller_Test
- Tests_Theme_wpThemeJsonResolver
- Tests_Theme_wpThemeJsonSchema
- Tests_Theme_wpThemeJson

This will help ensure the stability of the theme.json style generation.

Props ajlende, scruffian, aaronrobertshaw, get_dave, youknowriad.
Fixes #60387.

git-svn-id: https://develop.svn.wordpress.org/trunk@57662 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella
2024-02-20 09:53:11 +00:00
parent 977653e0f9
commit 18b21c34c8
8 changed files with 1025 additions and 831 deletions

View File

@@ -0,0 +1,18 @@
{
"version": 2,
"settings": {
"blocks": {
"core/paragraph": {
"color": {
"palette": [
{
"slug": "dark",
"name": "Dark",
"color": "#010101"
}
]
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 1,
"version": 2,
"settings": {
"color": {
"palette": [

View File

@@ -0,0 +1,18 @@
{
"version": 2,
"settings": {
"blocks": {
"core/paragraph": {
"color": {
"palette": [
{
"slug": "light",
"name": "Light",
"color": "#f2f2f2"
}
]
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 1,
"version": 2,
"title": "Block theme",
"settings": {
"color": {
@@ -42,11 +42,11 @@
}
],
"customFontSize": false,
"customLineHeight": true
"lineHeight": true
},
"spacing": {
"units": ["rem"],
"customPadding": true,
"units": [ "rem" ],
"padding": true,
"blockGap": true
},
"blocks": {
@@ -63,8 +63,8 @@
}
}
},
"styles" : {
"blocks" :{
"styles": {
"blocks": {
"core/post-featured-image": {
"shadow": "10px 10px 5px 0px rgba(0,0,0,0.66)",
"filter": {
@@ -122,7 +122,7 @@
{
"name": "custom-single-post-template",
"title": "Custom Single Post template",
"postTypes": ["post"]
"postTypes": [ "post" ]
}
],
"templateParts": [