diff --git a/tests/cypress/e2e/create-post.test.js b/tests/cypress/e2e/create-post.test.js index 8360391..2fc608b 100644 --- a/tests/cypress/e2e/create-post.test.js +++ b/tests/cypress/e2e/create-post.test.js @@ -98,15 +98,26 @@ describe('Command: createPost', () => { ) { name = 'Summary'; } - cy.openDocumentSettingsPanel(name); - }); - cy.get('label') - .contains('Stick to the top of the blog') - .click() - .parent() - .find('input[type="checkbox"]') - .should('be.checked'); + // WP 6.6 handling. + if ($body.find('.editor-post-summary').length === 0) { + cy.openDocumentSettingsPanel(name); + + cy.get('label') + .contains('Stick to the top of the blog') + .click() + .parent() + .find('input[type="checkbox"]') + .should('be.checked'); + } else { + cy.get( + '.editor-post-sticky__toggle-control input[type="checkbox"]' + ).check(); + cy.get( + '.editor-post-sticky__toggle-control input[type="checkbox"]' + ).should('be.checked'); + } + }); }, });