@@ -10,14 +10,20 @@ import {
1010import rowContent100 from './row-block-content/row-1.0.0' ;
1111import rowContent110 from './row-block-content/row-1.1.0' ;
1212import rowContent140 from './row-block-content/row-1.4.0' ;
13+ import rowContentBootstrap5 from './row-block-content/row-bootstrap5' ;
1314import {
1415 testVersion100RowFeatures ,
1516 testVersion110RowFeatures ,
1617 testVersion100ColumnFeatures ,
1718 testVersion110ColumnFeatures ,
1819 testVersion140ColumnFeatures ,
1920} from './feature-tests' ;
20- import { ensureSidebarOpened } from '../helper' ;
21+ import {
22+ ensureSidebarOpened ,
23+ getInputValueByLabel ,
24+ openSidebarPanelWithTitle ,
25+ } from '../helper' ;
26+ import { selectColumnBlock } from '../column/column-helper' ;
2127
2228describe ( 'row block backwards compatibility' , ( ) => {
2329 beforeEach ( async ( ) => {
@@ -100,4 +106,30 @@ describe( 'row block backwards compatibility', () => {
100106 await testVersion140ColumnFeatures ( ) ;
101107 } ) ;
102108 /* eslint-enable jest/expect-expect */
109+
110+ it ( 'Bootstrap 4 works with Bootstrap 5 settings' , async ( ) => {
111+ await setPostContent ( rowContentBootstrap5 ) ;
112+ await ensureSidebarOpened ( ) ;
113+
114+ // Select 1. Column of 1. Row
115+ await selectColumnBlock ( 0 , 0 ) ;
116+
117+ // Check if row block could be inserted without error
118+ expect (
119+ await page . $ (
120+ '.block-editor-block-list__block[data-type="wp-bootstrap-blocks/row"]'
121+ )
122+ ) . not . toBeNull ( ) ;
123+ expect (
124+ await page . $$ (
125+ '.block-editor-block-list__block[data-type="wp-bootstrap-blocks/column"]'
126+ )
127+ ) . toHaveLength ( 2 ) ;
128+
129+ // Check if Bootstrap 4 values are set in inspector controls
130+ await openSidebarPanelWithTitle ( 'Column size' ) ;
131+ expect ( await getInputValueByLabel ( 'Md Column count' ) ) . toMatch (
132+ '8'
133+ ) ;
134+ } ) ;
103135} ) ;
0 commit comments