Skip to content

Commit

Permalink
Add jsdoc to the editTemplateTitle helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
fullofcaffeine committed Apr 28, 2023
1 parent 2b47122 commit 50ad3e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/e2e/specs/editor/various/post-editor-template-mode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,18 @@ class PostEditorTemplateMode {
await cancelButton.click();
}

/**
* Edit the title of a template. The title is saved automatically, no
* need to click anything, though we do click outside of the dialog
* to close it.
*
* This needs to be called only after the template edit mode has been
* activated or it will fail, i.e after creating a new custom template
* or after calling `switchToTemplateMode()`.
*
* @param {string} newTitle the new title to set.
* @return {Promise<void>}
*/
async editTemplateTitle( newTitle ) {
await this.page.click( 'button[aria-label="Template Options"]' );

Expand Down

0 comments on commit 50ad3e6

Please sign in to comment.