Skip to content

Commit

Permalink
Fix e2e interactivity utils
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Dec 18, 2024
1 parent 769342b commit a423826
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/e2e/specs/interactivity/fixtures/interactivity-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,20 @@ export default class InteractivityUtils {
name: string,
{ attributes, alias, innerBlocks }: AddPostWithBlockOptions = {}
) {
const block = attributes
? `${ name } ${ JSON.stringify( attributes ) }`
: name;

if ( ! alias ) {
alias = block;
}

const content = generateBlockMarkup( [
name,
attributes,
innerBlocks,
] );

if ( ! alias ) {
alias = content;
}

const payload = {
content,
status: 'publish' as 'publish',
Expand Down

0 comments on commit a423826

Please sign in to comment.