Skip to content

Commit

Permalink
update createPost support command
Browse files Browse the repository at this point in the history
  • Loading branch information
sksaju committed Nov 24, 2024
1 parent a721bde commit 1b03f70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Cypress.Commands.add('setLocalStorage', (key, value) => {
// Create a new post
Cypress.Commands.add('createPost', ({ title = '' } = {}) => {
cy.visit('/wp-admin/post-new.php');

// Wait for the editor to load
cy.get('.editor-post-title__input', { timeout: 10000 }).should('be.visible');

if (title) {
cy.get('.editor-post-title__input').type(`${title} - ${Date.now()}`);
}
Expand Down

0 comments on commit 1b03f70

Please sign in to comment.