Skip to content

Commit 9a175a8

Browse files
committed
fix e2e test with custom gutter options
1 parent d833fac commit 9a175a8

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

cypress/integration/row/row-filters-bootstrap-v5.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ describe( 'Row Block Filters Bootstrap 5', () => {
2727
cy.clickElementByText( 'label', 'No Gutters' );
2828

2929
// Additional horizontal gutters option should be available
30-
cy.selectOptionIsAvailable( 'Horizontal Gutters', 'gx-4' );
30+
cy.selectOptionIsAvailable( 'Horizontal Gutters', 'gx-10' );
3131

3232
// Horizontal Gutters option should be applied
33-
cy.getSelectByLabel( 'Horizontal Gutters' ).select( 'gx-4' );
33+
cy.getSelectByLabel( 'Horizontal Gutters' ).select( 'gx-10' );
3434

3535
cy.postContentMatchesSnapshot();
3636
} );
@@ -44,10 +44,10 @@ describe( 'Row Block Filters Bootstrap 5', () => {
4444
cy.clickElementByText( 'label', 'No Gutters' );
4545

4646
// Additional vertical gutters option should be available
47-
cy.selectOptionIsAvailable( 'Vertical Gutters', 'gy-4' );
47+
cy.selectOptionIsAvailable( 'Vertical Gutters', 'gy-10' );
4848

4949
// Vertical Gutters option should be applied
50-
cy.getSelectByLabel( 'Vertical Gutters' ).select( 'gy-4' );
50+
cy.getSelectByLabel( 'Vertical Gutters' ).select( 'gy-10' );
5151

5252
cy.postContentMatchesSnapshot();
5353
} );

cypress/integration/row/row-filters-css-grid.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ describe( 'Row Block Filters CSS grid', () => {
2727
cy.clickElementByText( 'label', 'No Gutters' );
2828

2929
// Additional gutters option should be available
30-
cy.selectOptionIsAvailable( 'Gutters', '1.5rem' );
30+
cy.selectOptionIsAvailable( 'Gutters', '10rem' );
3131

3232
// Gutters option should be applied
33-
cy.getSelectByLabel( 'Gutters' ).select( '1.5rem' );
33+
cy.getSelectByLabel( 'Gutters' ).select( '10rem' );
3434

3535
cy.postContentMatchesSnapshot();
3636
} );

e2e-test-plugins/row-filters/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
return [
3939
...horizontalGuttersOptions,
4040
{
41-
label: 'Medium',
42-
value: 'gx-4',
41+
label: 'Huge',
42+
value: 'gx-10',
4343
},
4444
];
4545
}
@@ -54,8 +54,8 @@
5454
return [
5555
...verticalGuttersOptions,
5656
{
57-
label: 'Medium',
58-
value: 'gy-4',
57+
label: 'Huge',
58+
value: 'gy-10',
5959
},
6060
];
6161
}
@@ -70,8 +70,8 @@
7070
return [
7171
...cssGridGuttersOptions,
7272
{
73-
label: 'Medium',
74-
value: '1.5rem',
73+
label: 'Huge',
74+
value: '10rem',
7575
},
7676
];
7777
}

snapshots.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ module.exports = {
4848
},
4949
"Row Block Filters Bootstrap 5": {
5050
"wpBootstrapBlocks.row.horizontalGuttersOptions should add horizontal gutters option": {
51-
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"horizontalGutters\":\"gx-4\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
51+
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"horizontalGutters\":\"gx-10\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
5252
},
5353
"wpBootstrapBlocks.row.verticalGuttersOptions should add vertical gutters option": {
54-
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"verticalGutters\":\"gy-4\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
54+
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"verticalGutters\":\"gy-10\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
5555
},
5656
"wp_bootstrap_blocks_row_default_attributes should override default attributes with Bootstrap 5": {
5757
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
@@ -175,7 +175,7 @@ module.exports = {
175175
},
176176
"Row Block Filters CSS grid": {
177177
"wpBootstrapBlocks.row.cssGridGuttersOptions should add gutters option": {
178-
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"cssGridGutters\":\"1.5rem\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
178+
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false,\"cssGridGutters\":\"10rem\"} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"
179179
},
180180
"wp_bootstrap_blocks_row_default_attributes should override default attributes with CSS grid": {
181181
"1": "<!-- wp:wp-bootstrap-blocks/row {\"noGutters\":false} -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":4} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":8} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"

0 commit comments

Comments
 (0)