Change block default order to 10000 (#41100)

* Change block default order to 10000

* Update tests
This commit is contained in:
Nathan Silveira 2023-11-01 12:39:57 -03:00 committed by GitHub
parent 408d6b7aee
commit 9850aef247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 12 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update product editor default block order to 10000

View File

@ -31,7 +31,7 @@ class AbstractBlock implements BlockInterface {
* *
* @var int * @var int
*/ */
private $order = 10; private $order = 10000;
/** /**
* The block attributes. * The block attributes.

View File

@ -469,7 +469,7 @@ class BlockTemplateTest extends WC_Unit_Test_Case {
'inserted-block', 'inserted-block',
[ [
'_templateBlockId' => 'inserted-block-1', '_templateBlockId' => 'inserted-block-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
], ],
@ -627,7 +627,7 @@ class BlockTemplateTest extends WC_Unit_Test_Case {
'inserted-block', 'inserted-block',
[ [
'_templateBlockId' => 'inserted-block-1', '_templateBlockId' => 'inserted-block-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
], ],

View File

@ -461,7 +461,7 @@ class BlockTest extends WC_Unit_Test_Case {
'attr-1' => 'value-1', 'attr-1' => 'value-1',
'attr-2' => 'value-2', 'attr-2' => 'value-2',
'_templateBlockId' => 'test-block-id', '_templateBlockId' => 'test-block-id',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
'_templateBlockHideConditions' => [ '_templateBlockHideConditions' => [
[ [
'expression' => 'foo === bar', 'expression' => 'foo === bar',
@ -475,14 +475,14 @@ class BlockTest extends WC_Unit_Test_Case {
'attr-3' => 'value-3', 'attr-3' => 'value-3',
'attr-4' => 'value-4', 'attr-4' => 'value-4',
'_templateBlockId' => 'test-block-id-2', '_templateBlockId' => 'test-block-id-2',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
[ [
'test-block-name-3', 'test-block-name-3',
[ [
'_templateBlockId' => 'test-block-id-3', '_templateBlockId' => 'test-block-id-3',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
], ],
@ -544,7 +544,7 @@ class BlockTest extends WC_Unit_Test_Case {
'test-block-name', 'test-block-name',
[ [
'_templateBlockId' => 'test-block-name-1', '_templateBlockId' => 'test-block-name-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
[ [
[ [

View File

@ -39,7 +39,7 @@ class CustomBlockTest extends WC_Unit_Test_Case {
'test-block-name', 'test-block-name',
[ [
'_templateBlockId' => 'test-block-name-1', '_templateBlockId' => 'test-block-name-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
[ [
[ [
@ -47,7 +47,7 @@ class CustomBlockTest extends WC_Unit_Test_Case {
[ [
'title' => 'a', 'title' => 'a',
'_templateBlockId' => 'custom-inner-block-1', '_templateBlockId' => 'custom-inner-block-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
[ [
@ -55,7 +55,7 @@ class CustomBlockTest extends WC_Unit_Test_Case {
[ [
'title' => 'b', 'title' => 'b',
'_templateBlockId' => 'custom-inner-block-2', '_templateBlockId' => 'custom-inner-block-2',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
], ],
@ -81,7 +81,7 @@ class CustomBlockTest extends WC_Unit_Test_Case {
'test-block-name', 'test-block-name',
[ [
'_templateBlockId' => 'test-block-name-1', '_templateBlockId' => 'test-block-name-1',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
[ [
[ [
@ -89,7 +89,7 @@ class CustomBlockTest extends WC_Unit_Test_Case {
[ [
'title' => 'b', 'title' => 'b',
'_templateBlockId' => 'custom-inner-block-2', '_templateBlockId' => 'custom-inner-block-2',
'_templateBlockOrder' => 10, '_templateBlockOrder' => 10000,
], ],
], ],
], ],