-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Generic end 2 end test to the block transforms.
- Loading branch information
1 parent
c34d6b7
commit ea59dfc
Showing
6 changed files
with
596 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Returns a string containing the block title associated with the provided block name. | ||
* @param {string} blockName Block name. | ||
* | ||
* @return {Promise} Promise resolving with a string containing the block title. | ||
*/ | ||
export async function getBlockTitle( blockName ) { | ||
return page.evaluate( ( _blockName ) => { | ||
return wp.data.select( 'core/blocks' ).getBlockType( _blockName ).title; | ||
}, blockName ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.