Directory

E2E Utils: Return block locator from createBlock() by WunderBart · Pull Request #55851 · WordPress/gutenberg · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E Utils: Return block locator from createBlock() #55851

Closed
wants to merge 1 commit into from

Conversation

WunderBart
Copy link
Member

What?

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

}, blockRepresentation );

return this.canvas.locator( `#block-${ clientId }` );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this, but one issue I can see is that if you reload the page after block insertion and try to use this locator in assertion, it will fail.

Copy link
Member Author

@WunderBart WunderBart Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I assumed the ID is persistent, so GTK it's not. 😄 At this point, I can't see any other persistent value of a newly inserted block that we could reference, so this isn't going to work. Closing!

@WunderBart
Copy link
Member Author

See #55851 (comment)

@WunderBart WunderBart closed this Nov 6, 2023
@WunderBart WunderBart deleted the add/e2e-return-locator-from-create-block branch November 6, 2023 15:13
@Mamaduka
Copy link
Member

Mamaduka commented Nov 6, 2023

Thanks for taking the time and exploring this idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants