diff --git a/packages/blocks/src/store/test/selectors.js b/packages/blocks/src/store/test/selectors.js index 7301cdd001e0a7..507062b0bc908b 100644 --- a/packages/blocks/src/store/test/selectors.js +++ b/packages/blocks/src/store/test/selectors.js @@ -457,22 +457,40 @@ describe( 'selectors', () => { { name: 'variation-1', attributes: { - testAttribute: { + firstTestAttribute: { nestedProperty: 1, secondNestedProperty: 10, }, + secondTestAttribute: { + nestedProperty: { + firstDeeplyNestedProperty: 'a1', + secondDeeplyNestedProperty: 'a2', + }, + }, }, - isActive: [ 'testAttribute' ], + isActive: [ + 'firstTestAttribute', + 'secondTestAttribute.nestedProperty', + ], }, { name: 'variation-2', attributes: { - testAttribute: { + firstTestAttribute: { nestedProperty: 2, secondNestedProperty: 20, }, + secondTestAttribute: { + nestedProperty: { + firstDeeplyNestedProperty: 'b1', + secondDeeplyNestedProperty: 'b2', + }, + }, }, - isActive: [ 'testAttribute' ], + isActive: [ + 'firstTestAttribute', + 'secondTestAttribute.nestedProperty', + ], }, ]; const state = @@ -480,20 +498,34 @@ describe( 'selectors', () => { expect( getActiveBlockVariation( state, blockName, { - testAttribute: { + firstTestAttribute: { nestedProperty: 1, secondNestedProperty: 10, otherNestedProperty: 5555, }, + secondTestAttribute: { + nestedProperty: { + firstDeeplyNestedProperty: 'a1', + secondDeeplyNestedProperty: 'a2', + otherDeeplyNestedProperty: 'ffff', + }, + }, } ) ).toEqual( variations[ 0 ] ); expect( getActiveBlockVariation( state, blockName, { - testAttribute: { + firstTestAttribute: { nestedProperty: 2, secondNestedProperty: 20, otherNestedProperty: 5555, }, + secondTestAttribute: { + nestedProperty: { + firstDeeplyNestedProperty: 'b1', + secondDeeplyNestedProperty: 'b2', + otherDeeplyNestedProperty: 'ffff', + }, + }, } ) ).toEqual( variations[ 1 ] ); } );