Skip to content

Commit

Permalink
Fix tests in trunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Jul 5, 2024
1 parent bf19723 commit d5e33a9
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tests/cypress/e2e/create-post.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
});
},
});

Expand Down

0 comments on commit d5e33a9

Please sign in to comment.