Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e tests with WP 6.3 #3599

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix e2e tests with WP 6.3
  • Loading branch information
felipeelia committed Aug 11, 2023
commit 6ab661752fb2d8c6610262dab574d33c5cdf4a52
5 changes: 5 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"config": {
"WP_DEBUG": true,
"WP_DEBUG_DISPLAY": true,
"WP_DISABLE_FATAL_ERROR_HANDLER": true
},
"env": {
"tests": {
"themes": [
Expand Down
33 changes: 27 additions & 6 deletions tests/cypress/support/commands/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Cypress.Commands.add('supportsBlockTypography', { prevSubject: true }, (subject,
cy.get('.block-editor-block-inspector button[aria-label="Styles"]').click();
cy.get('.block-editor-block-inspector button[aria-label="Typography options"]').click();

cy.get('.popover-slot button[aria-label="Show Font size').click();
cy.get('.popover-slot button[aria-label="Show Line height').click().type('{esc}');
cy.get('.popover-slot button').contains('Font size').click();
cy.get('.popover-slot button').contains('Font size').click().type('{esc}');

cy.get('.block-editor-block-inspector button[aria-label="Font size"]').click();
cy.get('.block-editor-block-inspector li[role="option"]').contains('Extra small').click();
Expand All @@ -73,13 +73,34 @@ Cypress.Commands.add('supportsBlockDimensions', { prevSubject: true }, (subject,
cy.get('.block-editor-block-inspector button[aria-label="Styles"]').click();
cy.get('.block-editor-block-inspector button[aria-label="Dimensions options"]').click();

cy.get('.popover-slot button[aria-label="Show Padding').click().type('{esc}');
cy.get('.dimensions-block-support-panel').as('dimensionsPanel');

cy.get('.component-spacing-sizes-control button[aria-label="Set custom size"]').click();
cy.get('.component-spacing-sizes-control input[type="number"]').clearThenType('10');
cy.get('.popover-slot button').contains('Padding').click().type('{esc}');

cy.get('@dimensionsPanel')
.find('.component-spacing-sizes-control, .spacing-sizes-control__wrapper')
.first()
.as('verticalInputsWrapper');

cy.get('@verticalInputsWrapper')
.find('button[aria-label="Set custom size"]')
.first()
.click();
cy.get('@verticalInputsWrapper').find('input[type="number"]').clearThenType('10');

cy.get('@dimensionsPanel')
.find('.component-spacing-sizes-control, .spacing-sizes-control__wrapper')
.eq(1)
.as('horizontalInputsWrapper');

cy.get('@horizontalInputsWrapper')
.find('button[aria-label="Set custom size"]')
.first()
.click();
cy.get('@horizontalInputsWrapper').find('input[type="number"]').clearThenType('15');

cy.get('.block-editor-block-inspector button[aria-label="Settings"]').click();
}

cy.wrap(subject).should('have.css', 'padding', '10px');
cy.wrap(subject).should('have.css', 'padding', '10px 15px');
});