diff --git a/packages/block-library/src/columns/test/__snapshots__/edit.native.js.snap b/packages/block-library/src/columns/test/__snapshots__/edit.native.js.snap index d99bdfb8f7d640..b6fd551f348a81 100644 --- a/packages/block-library/src/columns/test/__snapshots__/edit.native.js.snap +++ b/packages/block-library/src/columns/test/__snapshots__/edit.native.js.snap @@ -202,6 +202,78 @@ exports[`Columns block when using the number of columns setting adds a column bl " `; +exports[`Columns block when using the number of columns setting adds at least 15 Column blocks without limitation 1`] = ` +" +
+
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+" +`; + exports[`Columns block when using the number of columns setting reaches the minimum limit of number of column blocks 1`] = ` "
diff --git a/packages/block-library/src/columns/test/edit.native.js b/packages/block-library/src/columns/test/edit.native.js index 565b0e695cad29..558041535aa574 100644 --- a/packages/block-library/src/columns/test/edit.native.js +++ b/packages/block-library/src/columns/test/edit.native.js @@ -93,6 +93,31 @@ describe( 'Columns block', () => { expect( getEditorHtml() ).toMatchSnapshot(); } ); + it( 'adds at least 15 Column blocks without limitation', async () => { + const screen = await initializeEditor( { + initialHtml: TWO_COLUMNS_BLOCK_HTML, + } ); + const { getByLabelText } = screen; + + // Get block + const columnsBlock = await getBlock( screen, 'Columns' ); + fireEvent.press( columnsBlock ); + + // Open block settings + await openBlockSettings( screen ); + + // Update the number of columns + const columnsControl = getByLabelText( /Number of columns/ ); + + for ( let x = 0; x < 15; x++ ) { + fireEvent( columnsControl, 'accessibilityAction', { + nativeEvent: { actionName: 'increment' }, + } ); + } + + expect( getEditorHtml() ).toMatchSnapshot(); + } ); + it( 'removes a column block when decrementing the value', async () => { const screen = await initializeEditor( { initialHtml: TWO_COLUMNS_BLOCK_HTML,